@fiado/api-invoker 1.1.34 → 1.1.36

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,9 @@
1
1
  import { ISTPAccountApi } from "./interfaces/ISTPAccountApi";
2
2
  import { IHttpRequest } from "@fiado/http-client";
3
- import { CreateBankAccountRequest } from "@fiado/type-kit/bin/account";
3
+ import { AccountCreateRequest } from "@fiado/type-kit/bin/account";
4
4
  export default class PomeloApi implements ISTPAccountApi {
5
5
  private httpRequest;
6
6
  private readonly baseUrl;
7
7
  constructor(httpRequest: IHttpRequest);
8
- createAccount(request: CreateBankAccountRequest): Promise<any>;
8
+ createAccount(request: AccountCreateRequest): Promise<any>;
9
9
  }
@@ -1,4 +1,4 @@
1
- import { CreateBankAccountRequest } from "@fiado/type-kit/bin/account";
1
+ import { AccountCreateRequest } from "@fiado/type-kit/bin/account";
2
2
  export interface ISTPAccountApi {
3
- createAccount(request: CreateBankAccountRequest): Promise<any>;
3
+ createAccount(request: AccountCreateRequest): Promise<any>;
4
4
  }
@@ -19,7 +19,7 @@ export default class TernApi implements ITernApi {
19
19
  activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
20
20
  assignCardToUser(request: AssignCardRequest): Promise<any>;
21
21
  p2pTransfer(request: BankAccountP2pTransferRequest): Promise<any>;
22
- getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail?: boolean): Promise<any>;
22
+ getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail?: boolean, raw?: boolean): Promise<any>;
23
23
  getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any>;
24
24
  getAccountTransactions(accountId: string): Promise<any>;
25
25
  }
@@ -74,9 +74,9 @@ let TernApi = class TernApi {
74
74
  return await this.httpRequest.patch(url, request);
75
75
  }
76
76
  //transactions
77
- async getTransactions(accountId, page, pageSize, startDate, endDate, detail = false) {
77
+ async getTransactions(accountId, page, pageSize, startDate, endDate, detail = false, raw = false) {
78
78
  try {
79
- let url = `${this.baseUrl}users/${accountId}/v2/transactions?page=${page}&detail=${detail}`;
79
+ let url = `${this.baseUrl}users/${accountId}/v2/transactions?page=${page}&detail=${detail}&raw=${raw}`;
80
80
  // Verificar si pageSize es válido y agregarlo
81
81
  if (pageSize != null) {
82
82
  url += `&pageSize=${encodeURIComponent(pageSize)}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.1.34",
3
+ "version": "1.1.36",
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",
@@ -16,7 +16,7 @@
16
16
  "@fiado/gateway-adapter": "^1.1.32",
17
17
  "@fiado/http-client": "^1.0.2",
18
18
  "@fiado/logger": "^1.0.2",
19
- "@fiado/type-kit": "^1.3.2",
19
+ "@fiado/type-kit": "^1.3.6",
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 {ISTPAccountApi } from "./interfaces/ISTPAccountApi";
2
2
  import {inject, injectable} from "inversify";
3
3
  import {IHttpRequest} from "@fiado/http-client";
4
- import {CreateBankAccountRequest, CreateBankAccountUserRequest, UpdateBankAccountUserRequest} from "@fiado/type-kit/bin/account";
4
+ import {AccountCreateRequest} from "@fiado/type-kit/bin/account";
5
5
 
6
6
 
7
7
  @injectable()
@@ -15,7 +15,7 @@ export default class PomeloApi implements ISTPAccountApi {
15
15
 
16
16
  //ACCOUNT
17
17
  // //USER
18
- async createAccount(request: CreateBankAccountRequest): Promise<any> {
18
+ async createAccount(request: AccountCreateRequest): Promise<any> {
19
19
  const url: string = `${this.baseUrl}account/create`;
20
20
  return await this.httpRequest.post(url, request);
21
21
  }
@@ -1,7 +1,7 @@
1
- import {CreateBankAccountRequest, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserRequest, GetBankAccountUserResponse, UpdateBankAccountUserRequest, UpdateBankAccountUserResponse} from "@fiado/type-kit/bin/account";
1
+ import {AccountCreateRequest} from "@fiado/type-kit/bin/account";
2
2
 
3
3
  export interface ISTPAccountApi {
4
4
  // updateUser(object: UpdateBankAccountUserRequest): Promise<any>
5
5
  // getUserById(externalUserId: string): Promise<any>
6
- createAccount(request: CreateBankAccountRequest): Promise<any>;
6
+ createAccount(request: AccountCreateRequest): Promise<any>;
7
7
  }
@@ -95,9 +95,9 @@ export default class TernApi implements ITernApi {
95
95
  }
96
96
 
97
97
  //transactions
98
- async getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail: boolean = false): Promise<any> {
98
+ async getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail: boolean = false, raw: boolean = false): Promise<any> {
99
99
  try {
100
- let url = `${this.baseUrl}users/${accountId}/v2/transactions?page=${page}&detail=${detail}`;
100
+ let url = `${this.baseUrl}users/${accountId}/v2/transactions?page=${page}&detail=${detail}&raw=${raw}`;
101
101
 
102
102
  // Verificar si pageSize es válido y agregarlo
103
103
  if (pageSize != null) {