@fiado/api-invoker 5.53.0 → 5.54.0
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.
- package/bin/account-pagoconfiado/AccountPagoConfiadoApi.d.ts +1 -1
- package/bin/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.d.ts +9 -1
- package/package.json +2 -2
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +1 -1
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +9 -1
|
@@ -9,7 +9,7 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
|
9
9
|
constructor(httpRequest: IHttpRequest);
|
|
10
10
|
cancelAccount(directoryId: string, accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>>;
|
|
11
11
|
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
12
|
-
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse
|
|
12
|
+
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse>>;
|
|
13
13
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
14
14
|
collectDebit(accountId: string, request: CollectDebitRequest): Promise<ApiGatewayResponse<CollectDebitResponse>>;
|
|
15
15
|
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
@@ -3,7 +3,15 @@ import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
|
3
3
|
import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
4
4
|
export interface IAccountPagoConfiadoApi {
|
|
5
5
|
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* La cuenta del titular. Devuelve UN objeto, no una lista: el lambda responde
|
|
8
|
+
* `ApiResponse.success({ data: account })`.
|
|
9
|
+
*
|
|
10
|
+
* Estuvo declarado como lista y no correspondia con lo que llega. Nadie lo noto porque sus
|
|
11
|
+
* consumidores lo leen sin tipar, pero el primero que confio en la declaracion escribio
|
|
12
|
+
* `data[0]` y su cobro reportaba como inexistente una cuenta que si estaba y tenia saldo.
|
|
13
|
+
*/
|
|
14
|
+
getAccountByDirectoryId(directoryId: string, provider: string): Promise<ApiGatewayResponse<GetAccountResponse>>;
|
|
7
15
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
8
16
|
/**
|
|
9
17
|
* Debita el saldo disponible de la cuenta para cobrar una deuda, en una sola operación que lleva
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.54.0",
|
|
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
|
"type": "module",
|
|
6
6
|
"main": "bin/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@fiado/gateway-adapter": "^3.9.0",
|
|
35
35
|
"@fiado/http-client": "^2.0.1",
|
|
36
36
|
"@fiado/logger": "^1.1.3",
|
|
37
|
-
"@fiado/type-kit": "^3.
|
|
37
|
+
"@fiado/type-kit": "^3.382.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -21,7 +21,7 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
|
21
21
|
return await this.httpRequest.post(url, data);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse
|
|
24
|
+
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse>> {
|
|
25
25
|
const url = `${this.baseUrl}users/${directoryId}`;
|
|
26
26
|
return await this.httpRequest.get(url);
|
|
27
27
|
}
|
|
@@ -6,7 +6,15 @@ import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
|
6
6
|
export interface IAccountPagoConfiadoApi {
|
|
7
7
|
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* La cuenta del titular. Devuelve UN objeto, no una lista: el lambda responde
|
|
11
|
+
* `ApiResponse.success({ data: account })`.
|
|
12
|
+
*
|
|
13
|
+
* Estuvo declarado como lista y no correspondia con lo que llega. Nadie lo noto porque sus
|
|
14
|
+
* consumidores lo leen sin tipar, pero el primero que confio en la declaracion escribio
|
|
15
|
+
* `data[0]` y su cobro reportaba como inexistente una cuenta que si estaba y tenia saldo.
|
|
16
|
+
*/
|
|
17
|
+
getAccountByDirectoryId(directoryId: string, provider: string): Promise<ApiGatewayResponse<GetAccountResponse>>;
|
|
10
18
|
|
|
11
19
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
12
20
|
|