@kushki/js 1.32.0 → 1.33.0-alpha-13682.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 +2 -0
- package/lib/Kushki.js +12 -0
- package/lib/gateway/KushkiGateway.d.ts +2 -0
- package/lib/gateway/KushkiGateway.js +3 -0
- package/lib/infrastructure/EnvironmentEnum.d.ts +1 -1
- package/lib/infrastructure/EnvironmentEnum.js +1 -1
- package/lib/infrastructure/PathEnum.d.ts +1 -0
- package/lib/infrastructure/PathEnum.js +1 -0
- package/lib/repository/IKushkiGateway.d.ts +9 -0
- package/lib/repository/IKushkiService.d.ts +9 -0
- package/lib/service/KushkiService.d.ts +2 -0
- package/lib/service/KushkiService.js +3 -0
- package/lib/types/get_brands_logos_by_merchant_response.d.ts +7 -0
- package/package.json +1 -1
package/lib/Kushki.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { CashTokenRequest } from "./../lib/types/cash_token_request";
|
|
|
14
14
|
import { DeletePaymentMethodRequest } from "./../lib/types/delete_payment_method_request";
|
|
15
15
|
import { DeviceTokenRequest } from "./../lib/types/device_token_request";
|
|
16
16
|
import { ErrorResponse } from "./../lib/types/error_response";
|
|
17
|
+
import { GetBrandsLogosByMerchantResponse } from "./../lib/types/get_brands_logos_by_merchant_response";
|
|
17
18
|
import { InitAuthRequest } from "./../lib/types/init_auth_request";
|
|
18
19
|
import { InitAuthResponse } from "./../lib/types/init_auth_response";
|
|
19
20
|
import { MobileProcessorToken } from "./../lib/types/mobile_processor_token";
|
|
@@ -100,6 +101,7 @@ export declare class Kushki {
|
|
|
100
101
|
requestDeferred(body: BinBody, callback: (value: IDeferredResponse[] | ErrorResponse) => void): void;
|
|
101
102
|
requestBinInfo(body: BinBody, callback: (value: BinInfoResponse | ErrorResponse) => void): void;
|
|
102
103
|
requestBrandsByMerchant(callback: (value: string[] | ErrorResponse) => void): void;
|
|
104
|
+
requestBrandsLogosByMerchant(callback: (value: GetBrandsLogosByMerchantResponse[] | ErrorResponse) => void): void;
|
|
103
105
|
requestCashToken(body: CashTokenRequest, callback: (value: TokenResponse | ErrorResponse) => void): void;
|
|
104
106
|
requestSecureServiceValidation(body: SecureOtpRequest, callback: (value: SecureOtpResponse | ErrorResponse) => void): void;
|
|
105
107
|
requestCardAsyncToken(body: CardAsyncTokenRequest, callback: (value: CardAsyncTokenResponse | ErrorResponse) => void): void;
|
package/lib/Kushki.js
CHANGED
|
@@ -101,6 +101,18 @@ var Kushki = /** @class */ (function () {
|
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
+
Kushki.prototype.requestBrandsLogosByMerchant = function (callback) {
|
|
105
|
+
this._kushkiService
|
|
106
|
+
.requestBrandsLogosByMerchant(this._merchantId, this._inTestEnvironment, this._regional)
|
|
107
|
+
.subscribe({
|
|
108
|
+
error: function (err) {
|
|
109
|
+
return Kushki.callbackError(err, callback);
|
|
110
|
+
},
|
|
111
|
+
next: function (response) {
|
|
112
|
+
callback(response);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
};
|
|
104
116
|
Kushki.prototype.requestCashToken = function (body, callback) {
|
|
105
117
|
this._resolve(this._cashService.requestCashToken(body, this._merchantId, this._inTestEnvironment, this._regional), callback);
|
|
106
118
|
};
|
|
@@ -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 { GetBrandsLogosByMerchantResponse } from "./../../lib/types/get_brands_logos_by_merchant_response";
|
|
12
13
|
import { GetUserId } from "./../../lib/types/get_user_id";
|
|
13
14
|
import { JwtResponse } from "./../../lib/types/jwt_response";
|
|
14
15
|
import { KushkiSubscriptionTokensRequest } from "./../../lib/types/kushki_subscription_tokens_request";
|
|
@@ -50,6 +51,7 @@ export declare class KushkiGateway implements IKushkiGateway {
|
|
|
50
51
|
requestGet<T extends object = object>(path: string, testEnv: boolean, regional: boolean, mid?: string): Observable<T>;
|
|
51
52
|
requestDelete<T extends object = object>(path: string, testEnv: boolean, regional: boolean, mid: string, authorization: string): Observable<T>;
|
|
52
53
|
requestBrandsByMerchant(mid: string, testEnv: boolean, regional: boolean): Observable<string[]>;
|
|
54
|
+
requestBrandsLogosByMerchant(mid: string, testEnv: boolean, regional: boolean): Observable<GetBrandsLogosByMerchantResponse[]>;
|
|
53
55
|
requestToken(body: KushkiTokensRequest, mid: string, testEnv: boolean, regional: boolean, authorization?: string): Observable<TokenResponse>;
|
|
54
56
|
requestDeviceToken(body: TokenChargeRequest, mid: string, testEnv: boolean, regional: boolean): Observable<TokenResponse>;
|
|
55
57
|
requestSubscriptionToken(body: KushkiSubscriptionTokensRequest, mid: string, testEnv: boolean, regional: boolean, authorization?: string): Observable<TokenResponse>;
|
|
@@ -88,6 +88,9 @@ var KushkiGateway = /** @class */ (function () {
|
|
|
88
88
|
KushkiGateway.prototype.requestBrandsByMerchant = function (mid, testEnv, regional) {
|
|
89
89
|
return this.requestGet("" + PathEnum_1.PathEnum.brands_by_merchant, testEnv, regional, mid);
|
|
90
90
|
};
|
|
91
|
+
KushkiGateway.prototype.requestBrandsLogosByMerchant = function (mid, testEnv, regional) {
|
|
92
|
+
return this.requestGet("" + PathEnum_1.PathEnum.brands_logos_by_merchant, testEnv, regional, mid);
|
|
93
|
+
};
|
|
91
94
|
KushkiGateway.prototype.requestToken = function (body, mid, testEnv, regional, authorization) {
|
|
92
95
|
var _this = this;
|
|
93
96
|
return rxjs_1.of(1).pipe(operators_1.concatMap(function () {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Environment enum file
|
|
4
4
|
*/
|
|
5
5
|
export declare enum EnvironmentEnum {
|
|
6
|
-
uat = "https://api-
|
|
6
|
+
uat = "https://api-qa.kushkipagos.net/",
|
|
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-
|
|
9
|
+
EnvironmentEnum["uat"] = "https://api-qa.kushkipagos.net/";
|
|
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/";
|
|
@@ -19,6 +19,7 @@ export declare enum PathEnum {
|
|
|
19
19
|
secure_validation = "rules/v1/secureValidation",
|
|
20
20
|
bin_info = "deferred/v2/bin/",
|
|
21
21
|
brands_by_merchant = "card/v1/merchant/brands",
|
|
22
|
+
brands_logos_by_merchant = "card/v1/merchant/brands-logos",
|
|
22
23
|
card_async_tokens = "card-async/v1/tokens",
|
|
23
24
|
subscription_card_async_tokens = "subscriptions/v1/card-async/tokens",
|
|
24
25
|
payouts_cash_tokens = "payouts/cash/v1/tokens",
|
|
@@ -22,6 +22,7 @@ var PathEnum;
|
|
|
22
22
|
PathEnum["secure_validation"] = "rules/v1/secureValidation";
|
|
23
23
|
PathEnum["bin_info"] = "deferred/v2/bin/";
|
|
24
24
|
PathEnum["brands_by_merchant"] = "card/v1/merchant/brands";
|
|
25
|
+
PathEnum["brands_logos_by_merchant"] = "card/v1/merchant/brands-logos";
|
|
25
26
|
PathEnum["card_async_tokens"] = "card-async/v1/tokens";
|
|
26
27
|
PathEnum["subscription_card_async_tokens"] = "subscriptions/v1/card-async/tokens";
|
|
27
28
|
PathEnum["payouts_cash_tokens"] = "payouts/cash/v1/tokens";
|
|
@@ -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 { GetBrandsLogosByMerchantResponse } from "./../../lib/types/get_brands_logos_by_merchant_response";
|
|
13
14
|
import { GetUserId } from "./../../lib/types/get_user_id";
|
|
14
15
|
import { JwtResponse } from "./../../lib/types/jwt_response";
|
|
15
16
|
import { KushkiSubscriptionTokensRequest } from "./../../lib/types/kushki_subscription_tokens_request";
|
|
@@ -104,6 +105,14 @@ export interface IKushkiGateway {
|
|
|
104
105
|
* @param regional - Define if endpoint used regional URL
|
|
105
106
|
*/
|
|
106
107
|
requestBrandsByMerchant(mid: string, isTest: boolean, regional: boolean): Observable<string[]>;
|
|
108
|
+
/**
|
|
109
|
+
* Get brands and logos by Merchant
|
|
110
|
+
* @param mid - public merchant id
|
|
111
|
+
* @param isTest - is test environment
|
|
112
|
+
* @param regional - Define if endpoint used regional URL
|
|
113
|
+
* @return GetBrandsLogosByMerchantResponse[]
|
|
114
|
+
*/
|
|
115
|
+
requestBrandsLogosByMerchant(mid: string, isTest: boolean, regional: boolean): Observable<GetBrandsLogosByMerchantResponse[]>;
|
|
107
116
|
/**
|
|
108
117
|
* Send Webpay tokens request to Transbank API
|
|
109
118
|
*/
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* ICardService file.
|
|
4
4
|
*/
|
|
5
5
|
import { Observable } from "rxjs";
|
|
6
|
+
import { GetBrandsLogosByMerchantResponse } from "./../../lib/types/get_brands_logos_by_merchant_response";
|
|
6
7
|
import { ResponseStatusValidator } from "./../../lib/types/response_status_validator";
|
|
7
8
|
export interface IKushkiService {
|
|
8
9
|
/**
|
|
@@ -19,4 +20,12 @@ export interface IKushkiService {
|
|
|
19
20
|
* @param regional - Define if endpoint used regional URL
|
|
20
21
|
*/
|
|
21
22
|
requestBrandsByMerchant(mid: string, isTest: boolean, regional: boolean): Observable<string[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Get brands and logos by Merchant
|
|
25
|
+
* @param mid - public merchant id
|
|
26
|
+
* @param isTest - is test environment
|
|
27
|
+
* @param regional - Define if endpoint used regional URL
|
|
28
|
+
* @return GetBrandsLogosByMerchantResponse[]
|
|
29
|
+
*/
|
|
30
|
+
requestBrandsLogosByMerchant(mid: string, isTest: boolean, regional: boolean): Observable<GetBrandsLogosByMerchantResponse[]>;
|
|
22
31
|
}
|
|
@@ -3,6 +3,7 @@ import "reflect-metadata";
|
|
|
3
3
|
import { IKushkiGateway } from "./../../lib/repository/IKushkiGateway";
|
|
4
4
|
import { IKushkiService } from "./../../lib/repository/IKushkiService";
|
|
5
5
|
import { Observable } from "rxjs";
|
|
6
|
+
import { GetBrandsLogosByMerchantResponse } from "./../../lib/types/get_brands_logos_by_merchant_response";
|
|
6
7
|
import { ResponseStatusValidator } from "./../../lib/types/response_status_validator";
|
|
7
8
|
/**
|
|
8
9
|
* Implementation
|
|
@@ -12,4 +13,5 @@ export declare class KushkiService implements IKushkiService {
|
|
|
12
13
|
constructor(gateway: IKushkiGateway);
|
|
13
14
|
checkStatus(mid: string, isTest: boolean, regional: boolean): Observable<ResponseStatusValidator>;
|
|
14
15
|
requestBrandsByMerchant(mid: string, isTest: boolean, regional: boolean): Observable<string[]>;
|
|
16
|
+
requestBrandsLogosByMerchant(mid: string, isTest: boolean, regional: boolean): Observable<GetBrandsLogosByMerchantResponse[]>;
|
|
15
17
|
}
|
|
@@ -32,6 +32,9 @@ var KushkiService = /** @class */ (function () {
|
|
|
32
32
|
KushkiService.prototype.requestBrandsByMerchant = function (mid, isTest, regional) {
|
|
33
33
|
return this._gateway.requestBrandsByMerchant(mid, isTest, regional);
|
|
34
34
|
};
|
|
35
|
+
KushkiService.prototype.requestBrandsLogosByMerchant = function (mid, isTest, regional) {
|
|
36
|
+
return this._gateway.requestBrandsLogosByMerchant(mid, isTest, regional);
|
|
37
|
+
};
|
|
35
38
|
KushkiService = __decorate([
|
|
36
39
|
inversify_1.injectable(),
|
|
37
40
|
__param(0, inversify_1.inject(Identifiers_1.IDENTIFIERS.KushkiGateway)),
|