@fiado/api-invoker 1.1.18 → 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.
@@ -6,4 +6,5 @@ export declare class CollectorApi implements ICollectorApi {
6
6
  private readonly baseUrl;
7
7
  constructor(httpRequest: IHttpRequest);
8
8
  createCreditContract(object: CreditContractCreateRequest): Promise<any>;
9
+ getCreditContract(relatedId: string): Promise<any>;
9
10
  }
@@ -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([
@@ -11,4 +11,5 @@ export interface ICollectorApi {
11
11
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
12
12
  */
13
13
  createCreditContract(object: CreditContractCreateRequest): Promise<any>;
14
+ getCreditContract(relatedId: string): Promise<any>;
14
15
  }
@@ -15,4 +15,7 @@ export interface ITernApi {
15
15
  activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
16
16
  assignCardToUser(request: AssignCardRequest): Promise<any>;
17
17
  p2pTransfer(request: any): Promise<any>;
18
+ getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail?: boolean): Promise<any>;
19
+ getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any>;
20
+ getAccountTransactions(accountId: string): Promise<any>;
18
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.1.18",
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
  }
@@ -27,4 +27,11 @@ export interface ITernApi {
27
27
  assignCardToUser(request: AssignCardRequest): Promise<any>;
28
28
 
29
29
  p2pTransfer(request: any): Promise<any>
30
+
31
+ getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail?: boolean): Promise<any>;
32
+
33
+ getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any>;
34
+
35
+ getAccountTransactions(accountId: string): Promise<any>
36
+
30
37
  }