web3-banking-system-sdk 1.0.7 → 1.0.9
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BaseService } from "./baseService";
|
|
2
|
-
import type { ApiResponse } from "../../types/api/common";
|
|
3
2
|
import type { GGEZGiftRewards, PromotionDetails, PromotionIncrementResult, PromotionServiceParameters, TwitterSpotlightPostIdsResult } from "../../types";
|
|
4
3
|
declare class PromotionService extends BaseService {
|
|
5
4
|
protected endpoint: string;
|
|
6
5
|
constructor(data: PromotionServiceParameters);
|
|
7
6
|
private onPromotionRequest;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
private onPromotionResponse;
|
|
8
|
+
getPromotionByCode(promotionCode: string): Promise<import("../..").ApiResponse<PromotionDetails>>;
|
|
9
|
+
getTwitterSpotlightPostIds(): Promise<import("../..").ApiResponse<TwitterSpotlightPostIdsResult>>;
|
|
10
|
+
incrementPromotionParticipants(data: GGEZGiftRewards): Promise<import("../..").ApiResponse<PromotionIncrementResult>>;
|
|
11
11
|
}
|
|
12
12
|
export { PromotionService };
|
|
@@ -5,12 +5,17 @@ class PromotionService extends BaseService {
|
|
|
5
5
|
constructor(data) {
|
|
6
6
|
super(data);
|
|
7
7
|
this.axiosInstance.interceptors.request.use((req) => this.onPromotionRequest(req));
|
|
8
|
+
this.axiosInstance.interceptors.response.use((res) => this.onPromotionResponse(res));
|
|
8
9
|
}
|
|
9
10
|
// #region "Interceptors Handlers"
|
|
10
11
|
async onPromotionRequest(req) {
|
|
11
12
|
req.baseURL = this.context.getNodeUrl();
|
|
12
13
|
return req;
|
|
13
14
|
}
|
|
15
|
+
async onPromotionResponse(res) {
|
|
16
|
+
const data = res?.data?.data;
|
|
17
|
+
return { ...res, data };
|
|
18
|
+
}
|
|
14
19
|
// #endregion
|
|
15
20
|
// #region "GET"
|
|
16
21
|
async getPromotionByCode(promotionCode) {
|
|
@@ -8,13 +8,13 @@ class TransactionService extends BaseService {
|
|
|
8
8
|
// #region "GET"
|
|
9
9
|
inquiry(payload) {
|
|
10
10
|
const url = this.resolveURL(TransactionEndpoints.Inquiry);
|
|
11
|
-
return this.GET(url, { params: payload });
|
|
11
|
+
return this.GET(url, { params: payload, flags: { showSensitiveData: true } });
|
|
12
12
|
}
|
|
13
13
|
// #endregion
|
|
14
14
|
// #region "POST"
|
|
15
15
|
create(payload) {
|
|
16
16
|
const url = this.resolveURL();
|
|
17
|
-
return this.POST(url, payload);
|
|
17
|
+
return this.POST(url, payload, { flags: { showSensitiveData: true } });
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
export { TransactionService };
|
package/package.json
CHANGED