@fiado/api-invoker 1.1.52 → 1.1.53
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,9 +1,10 @@
|
|
|
1
1
|
import { IStpSpeiApi } from "./interfaces/IStpSpeiApi";
|
|
2
2
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { PutStpOrderRequest } from "@fiado/type-kit/bin/stpSpei";
|
|
3
|
+
import { BusinessNameEnum, PutStpOrderRequest } from "@fiado/type-kit/bin/stpSpei";
|
|
4
4
|
export declare class StpSpeiApi implements IStpSpeiApi {
|
|
5
5
|
private httpRequest;
|
|
6
6
|
private readonly baseUrl;
|
|
7
7
|
constructor(httpRequest: IHttpRequest);
|
|
8
8
|
putStpOrder(request: PutStpOrderRequest): Promise<any>;
|
|
9
|
+
getBusinessAccountBalance(businessName: BusinessNameEnum): Promise<any>;
|
|
9
10
|
}
|
|
@@ -27,6 +27,10 @@ let StpSpeiApi = class StpSpeiApi {
|
|
|
27
27
|
};
|
|
28
28
|
return await this.httpRequest.post(url, request, headers);
|
|
29
29
|
}
|
|
30
|
+
async getBusinessAccountBalance(businessName) {
|
|
31
|
+
const url = `${this.baseUrl}accounts/${businessName}/balance`;
|
|
32
|
+
return await this.httpRequest.get(url);
|
|
33
|
+
}
|
|
30
34
|
};
|
|
31
35
|
exports.StpSpeiApi = StpSpeiApi;
|
|
32
36
|
exports.StpSpeiApi = StpSpeiApi = __decorate([
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { PutStpOrderRequest } from "@fiado/type-kit/bin/stpSpei";
|
|
1
|
+
import { BusinessNameEnum, PutStpOrderRequest } from "@fiado/type-kit/bin/stpSpei";
|
|
2
2
|
export interface IStpSpeiApi {
|
|
3
3
|
putStpOrder(request: PutStpOrderRequest): Promise<any>;
|
|
4
|
+
getBusinessAccountBalance(businessName: BusinessNameEnum): Promise<any>;
|
|
4
5
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.53",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a traves de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@aws-sdk/client-sqs": "^3.572.0",
|
|
16
|
-
"@fiado/gateway-adapter": "^1.1.
|
|
16
|
+
"@fiado/gateway-adapter": "^1.1.33",
|
|
17
17
|
"@fiado/http-client": "^1.0.2",
|
|
18
18
|
"@fiado/logger": "^1.0.2",
|
|
19
|
-
"@fiado/type-kit": "^1.4.
|
|
19
|
+
"@fiado/type-kit": "^1.4.41",
|
|
20
20
|
"dotenv": "^16.4.5",
|
|
21
21
|
"inversify": "^6.0.2",
|
|
22
22
|
"reflect-metadata": "^0.2.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {IStpSpeiApi} from "./interfaces/IStpSpeiApi";
|
|
2
2
|
import {inject, injectable} from "inversify";
|
|
3
3
|
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
-
import {PutStpOrderRequest} from "@fiado/type-kit/bin/stpSpei";
|
|
4
|
+
import {BusinessNameEnum, PutStpOrderRequest} from "@fiado/type-kit/bin/stpSpei";
|
|
5
5
|
|
|
6
6
|
@injectable()
|
|
7
7
|
export class StpSpeiApi implements IStpSpeiApi {
|
|
@@ -18,4 +18,9 @@ export class StpSpeiApi implements IStpSpeiApi {
|
|
|
18
18
|
}
|
|
19
19
|
return await this.httpRequest.post(url, request, headers);
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
async getBusinessAccountBalance(businessName: BusinessNameEnum): Promise<any> {
|
|
23
|
+
const url = `${this.baseUrl}accounts/${businessName}/balance`;
|
|
24
|
+
return await this.httpRequest.get(url);
|
|
25
|
+
}
|
|
21
26
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {PutStpOrderRequest} from "@fiado/type-kit/bin/stpSpei";
|
|
1
|
+
import {BusinessNameEnum, PutStpOrderRequest} from "@fiado/type-kit/bin/stpSpei";
|
|
2
2
|
|
|
3
3
|
export interface IStpSpeiApi {
|
|
4
4
|
putStpOrder(request: PutStpOrderRequest): Promise<any>;
|
|
5
|
+
|
|
6
|
+
getBusinessAccountBalance(businessName: BusinessNameEnum): Promise<any>;
|
|
5
7
|
}
|