@fiado/api-invoker 1.2.21 → 1.2.23
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/bin/transaction/api/TransactionApi.d.ts +1 -1
- package/bin/transaction/api/TransactionApi.js +10 -2
- package/bin/transaction/api/interfaces/ITransactionApi.d.ts +1 -1
- package/package.json +1 -1
- package/src/transaction/api/TransactionApi.ts +14 -2
- package/src/transaction/api/interfaces/ITransactionApi.ts +1 -1
|
@@ -5,7 +5,7 @@ export default class TransactionApi implements ITransactionApi {
|
|
|
5
5
|
private httpRequest;
|
|
6
6
|
private readonly baseUrl;
|
|
7
7
|
constructor(httpRequest: IHttpRequest);
|
|
8
|
-
getActivityProblemsByStatus(status: string): Promise<any>;
|
|
8
|
+
getActivityProblemsByStatus(status: string, index?: string, pageSize?: number): Promise<any>;
|
|
9
9
|
updateActivityProblemStatus(id: string, params: {
|
|
10
10
|
status: string;
|
|
11
11
|
}): Promise<any>;
|
|
@@ -18,8 +18,16 @@ let TransactionApi = class TransactionApi {
|
|
|
18
18
|
this.httpRequest = httpRequest;
|
|
19
19
|
this.baseUrl = process.env.TRANSACTION_LAMBDA_URL || "";
|
|
20
20
|
}
|
|
21
|
-
async getActivityProblemsByStatus(status) {
|
|
22
|
-
|
|
21
|
+
async getActivityProblemsByStatus(status, index, pageSize) {
|
|
22
|
+
let queryParams = [];
|
|
23
|
+
if (index) {
|
|
24
|
+
queryParams.push(`index=${index}`);
|
|
25
|
+
}
|
|
26
|
+
if (pageSize) {
|
|
27
|
+
queryParams.push(`pageSize=${pageSize}`);
|
|
28
|
+
}
|
|
29
|
+
queryParams.push(`status=${status}`);
|
|
30
|
+
const url = `${this.baseUrl}private/activityProblems/?${queryParams.join('&')}`;
|
|
23
31
|
return await this.httpRequest.get(url);
|
|
24
32
|
}
|
|
25
33
|
async updateActivityProblemStatus(id, params) {
|
|
@@ -29,7 +29,7 @@ export interface ITransactionApi {
|
|
|
29
29
|
params: any;
|
|
30
30
|
}): Promise<any>;
|
|
31
31
|
getTransactionsByDisputeOrFraudLogId(id: string): Promise<any>;
|
|
32
|
-
getActivityProblemsByStatus(status: string): Promise<any>;
|
|
32
|
+
getActivityProblemsByStatus(status: string, index?: string, pageSize?: number): Promise<any>;
|
|
33
33
|
updateActivityProblemStatus(id: string, params: {
|
|
34
34
|
status: string;
|
|
35
35
|
}): Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.23",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -12,8 +12,20 @@ export default class TransactionApi implements ITransactionApi {
|
|
|
12
12
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async getActivityProblemsByStatus(status: string): Promise<any> {
|
|
16
|
-
|
|
15
|
+
async getActivityProblemsByStatus(status: string, index?:string, pageSize?:number): Promise<any> {
|
|
16
|
+
|
|
17
|
+
let queryParams = [];
|
|
18
|
+
if (index) {
|
|
19
|
+
queryParams.push(`index=${index}`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (pageSize) {
|
|
23
|
+
queryParams.push(`pageSize=${pageSize}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
queryParams.push(`status=${status}`);
|
|
27
|
+
|
|
28
|
+
const url: string = `${this.baseUrl}private/activityProblems/?${queryParams.join('&')}`;
|
|
17
29
|
return await this.httpRequest.get(url);
|
|
18
30
|
}
|
|
19
31
|
|
|
@@ -28,7 +28,7 @@ export interface ITransactionApi {
|
|
|
28
28
|
|
|
29
29
|
getTransactionsByDisputeOrFraudLogId(id:string): Promise<any>
|
|
30
30
|
|
|
31
|
-
getActivityProblemsByStatus(status:string): Promise<any>
|
|
31
|
+
getActivityProblemsByStatus(status:string, index?:string, pageSize?:number): Promise<any>
|
|
32
32
|
|
|
33
33
|
updateActivityProblemStatus(id:string,params:{status:string}): Promise<any>
|
|
34
34
|
|