@fiado/api-invoker 1.1.19 → 1.1.20
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.
|
@@ -28,6 +28,10 @@ let CollectorApi = class CollectorApi {
|
|
|
28
28
|
const url = `${this.baseUrl}collector/creditcontracts/create`;
|
|
29
29
|
return await this.httpRequest.post(url, object);
|
|
30
30
|
}
|
|
31
|
+
async getCreditContract(relatedId) {
|
|
32
|
+
const url = `${this.baseUrl}collector/creditcontracts/collectordata?externalRelatedId=${relatedId}`;
|
|
33
|
+
return await this.httpRequest.get(url);
|
|
34
|
+
}
|
|
31
35
|
};
|
|
32
36
|
exports.CollectorApi = CollectorApi;
|
|
33
37
|
exports.CollectorApi = CollectorApi = __decorate([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
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",
|
|
@@ -11,11 +11,15 @@ export class CollectorApi implements ICollectorApi {
|
|
|
11
11
|
|
|
12
12
|
private readonly baseUrl = process.env.COLLECTOR_LAMBDA_URL || "";
|
|
13
13
|
|
|
14
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
15
|
-
|
|
14
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
15
|
+
|
|
16
16
|
async createCreditContract(object: CreditContractCreateRequest): Promise<any> {
|
|
17
17
|
const url = `${this.baseUrl}collector/creditcontracts/create`;
|
|
18
18
|
return await this.httpRequest.post(url, object);
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
async getCreditContract(relatedId: string): Promise<any> {
|
|
22
|
+
const url = `${this.baseUrl}collector/creditcontracts/collectordata?externalRelatedId=${relatedId}`;
|
|
23
|
+
return await this.httpRequest.get(url);
|
|
24
|
+
}
|
|
21
25
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ContractCreateRequest } from "@fiado/type-kit/bin/contract";
|
|
2
1
|
import CreditContractCreateRequest from "@fiado/type-kit/bin/creditContract/dtos/CreditContractCreateRequest";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -16,4 +15,7 @@ export interface ICollectorApi {
|
|
|
16
15
|
createCreditContract(object: CreditContractCreateRequest): Promise<any>
|
|
17
16
|
|
|
18
17
|
|
|
18
|
+
getCreditContract(relatedId: string): Promise<any>
|
|
19
|
+
|
|
20
|
+
|
|
19
21
|
}
|