@fiado/api-invoker 1.2.75 → 1.2.76

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.
@@ -31,6 +31,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
31
31
  createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
32
32
  getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
33
33
  getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>>;
34
+ getAccountByCardId(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountResponse>>;
34
35
  generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
35
36
  getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
36
37
  deleteCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
@@ -99,7 +99,11 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
99
99
  return await this.httpRequest.get(`${url}${param ?? ""}`);
100
100
  }
101
101
  async getAccountsByUserId(externalUserId) {
102
- const url = `${this.baseUrl}/cardholders/${externalUserId}/accounts`;
102
+ const url = `${this.baseUrl}/accounts/cardholders/${externalUserId}`;
103
+ return await this.httpRequest.get(url);
104
+ }
105
+ async getAccountByCardId(externalCardId) {
106
+ const url = `${this.baseUrl}/accounts/cards/${externalCardId}`;
103
107
  return await this.httpRequest.get(url);
104
108
  }
105
109
  async generateCardsInBatch(request) {
@@ -24,6 +24,7 @@ export interface ICentralPaymentsConnectorApi {
24
24
  createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
25
25
  getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
26
26
  getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>>;
27
+ getAccountByCardId(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountResponse>>;
27
28
  generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
28
29
  getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
29
30
  deleteCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.2.75",
3
+ "version": "1.2.76",
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",
@@ -141,7 +141,12 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
141
141
  }
142
142
 
143
143
  async getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>> {
144
- const url = `${this.baseUrl}/cardholders/${externalUserId}/accounts`;
144
+ const url = `${this.baseUrl}/accounts/cardholders/${externalUserId}`;
145
+ return await this.httpRequest.get(url);
146
+ }
147
+
148
+ async getAccountByCardId(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountResponse>> {
149
+ const url = `${this.baseUrl}/accounts/cards/${externalCardId}`;
145
150
  return await this.httpRequest.get(url);
146
151
  }
147
152
 
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  CreateBankAccountUserRequest,
3
- CreateBankAccountUserResponse, GetBankAccountResponse,
3
+ CreateBankAccountUserResponse,
4
+ GetBankAccountResponse,
4
5
  GetBankAccountUserResponse,
5
6
  UpdateBankAccountUserRequest
6
7
  } from "@fiado/type-kit/bin/account";
@@ -68,6 +69,8 @@ export interface ICentralPaymentsConnectorApi {
68
69
 
69
70
  getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>>;
70
71
 
72
+ getAccountByCardId(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountResponse>>;
73
+
71
74
  generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
72
75
 
73
76
  getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;