@fiado/api-invoker 1.5.11 → 1.5.12
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 +5 -0
- package/bin/account-pagoconfiado/AccountPagoConfiadoApi.js +14 -0
- package/bin/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.d.ts +5 -0
- package/package.json +1 -1
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +21 -1
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +12 -3
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +0 -46
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +0 -2
- package/bin/estafeta/EstafetaApi.d.ts +0 -0
- package/bin/estafeta/EstafetaApi.js +0 -0
|
@@ -14,4 +14,9 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
|
14
14
|
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
15
15
|
updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
16
16
|
getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>>;
|
|
17
|
+
getAccountListByDateMinorOrEqual(params: {
|
|
18
|
+
index?: string | null;
|
|
19
|
+
pageSize?: string;
|
|
20
|
+
date?: string;
|
|
21
|
+
}): Promise<ApiGatewayResponse<any>>;
|
|
17
22
|
}
|
|
@@ -46,6 +46,20 @@ let AccountPagoConfiadoApi = class AccountPagoConfiadoApi {
|
|
|
46
46
|
const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
|
|
47
47
|
return await this.httpRequest.get(url);
|
|
48
48
|
}
|
|
49
|
+
async getAccountListByDateMinorOrEqual(params) {
|
|
50
|
+
let queryParams = [];
|
|
51
|
+
if (params.index) {
|
|
52
|
+
queryParams.push(`index=${params.index}`);
|
|
53
|
+
}
|
|
54
|
+
if (params.pageSize) {
|
|
55
|
+
queryParams.push(`pageSize=${params.pageSize}`);
|
|
56
|
+
}
|
|
57
|
+
if (params.date) {
|
|
58
|
+
queryParams.push(`date=${params.date}`);
|
|
59
|
+
}
|
|
60
|
+
const url = `${this.baseUrl}?${queryParams.join('&')}`;
|
|
61
|
+
return await this.httpRequest.get(url);
|
|
62
|
+
}
|
|
49
63
|
};
|
|
50
64
|
AccountPagoConfiadoApi = __decorate([
|
|
51
65
|
(0, inversify_1.injectable)(),
|
|
@@ -9,4 +9,9 @@ export interface IAccountPagoConfiadoApi {
|
|
|
9
9
|
updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
10
10
|
getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>>;
|
|
11
11
|
cancelAccount(directoryId: string, accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>>;
|
|
12
|
+
getAccountListByDateMinorOrEqual(params: {
|
|
13
|
+
index?: string | null;
|
|
14
|
+
pageSize?: string;
|
|
15
|
+
date?: string;
|
|
16
|
+
}): Promise<ApiGatewayResponse<any>>;
|
|
12
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.12",
|
|
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",
|
|
@@ -9,7 +9,7 @@ import { Provider } from "@fiado/type-kit/bin/provider";
|
|
|
9
9
|
export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
10
10
|
private readonly baseUrl = process.env.ACCOUNT_PAGOCONFIADO_LAMBDA_URL || "";
|
|
11
11
|
|
|
12
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
12
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
13
13
|
|
|
14
14
|
async cancelAccount(directoryId:string,accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>> {
|
|
15
15
|
const url = `${this.baseUrl}/cancel`;
|
|
@@ -45,4 +45,24 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
|
45
45
|
const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
|
|
46
46
|
return await this.httpRequest.get(url);
|
|
47
47
|
}
|
|
48
|
+
|
|
49
|
+
async getAccountListByDateMinorOrEqual(params: { index?: string | null; pageSize?: string; date?: string; }): Promise<ApiGatewayResponse<any>> {
|
|
50
|
+
|
|
51
|
+
let queryParams = [];
|
|
52
|
+
|
|
53
|
+
if (params.index) {
|
|
54
|
+
queryParams.push(`index=${params.index}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (params.pageSize) {
|
|
58
|
+
queryParams.push(`pageSize=${params.pageSize}`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (params.date) {
|
|
62
|
+
queryParams.push(`date=${params.date}`);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const url = `${this.baseUrl}?${queryParams.join('&')}`;
|
|
66
|
+
return await this.httpRequest.get(url);
|
|
67
|
+
}
|
|
48
68
|
}
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
AccountUpdateRequest,
|
|
6
6
|
GetAccountResponse
|
|
7
7
|
} from "@fiado/type-kit/bin/account";
|
|
8
|
-
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
8
|
+
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
9
9
|
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
export interface IAccountPagoConfiadoApi {
|
|
13
13
|
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
14
14
|
|
|
15
|
-
getAccountByDirectoryId(directoryId: string, provider:string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
15
|
+
getAccountByDirectoryId(directoryId: string, provider: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
16
16
|
|
|
17
17
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
18
18
|
|
|
@@ -22,5 +22,14 @@ export interface IAccountPagoConfiadoApi {
|
|
|
22
22
|
|
|
23
23
|
getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>>;
|
|
24
24
|
|
|
25
|
-
cancelAccount(directoryId:string,accountNumber?:string,documentNumber?:string): Promise<ApiGatewayResponse<void>>;
|
|
25
|
+
cancelAccount(directoryId: string, accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>>;
|
|
26
|
+
|
|
27
|
+
getAccountListByDateMinorOrEqual(
|
|
28
|
+
params: {
|
|
29
|
+
|
|
30
|
+
index?: string | null,
|
|
31
|
+
pageSize?: string,
|
|
32
|
+
date?: string,
|
|
33
|
+
}
|
|
34
|
+
): Promise<ApiGatewayResponse<any>>;
|
|
26
35
|
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ChangePasswordRequest, GetUserRequest, GetUserResponse, RefreshTokenRequest, RefreshTokenResponse, RespondToAuthChallengeRequest, SetPasswordRequest, SignInRequest, SignInResponse, SignUpConfirmRequest, SignUpRequest, SignUpResponse } from "@fiado/type-kit/bin/cognitoConnector";
|
|
2
|
-
export interface ICognitoApi {
|
|
3
|
-
/**
|
|
4
|
-
* Healthcheck for the cognito-connector
|
|
5
|
-
*/
|
|
6
|
-
healthcheck(): Promise<HealthcheckResponse>;
|
|
7
|
-
/**
|
|
8
|
-
* Create a new user in Cognito
|
|
9
|
-
*/
|
|
10
|
-
signUp(request: SignUpRequest): Promise<SignUpResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* Confirm sign-up for a user in Cognito
|
|
13
|
-
*/
|
|
14
|
-
signUpConfirm(request: SignUpConfirmRequest): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Sign in a user
|
|
17
|
-
*/
|
|
18
|
-
signIn(request: SignInRequest): Promise<SignInResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Sign out a user
|
|
21
|
-
*/
|
|
22
|
-
signOut(): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Change a user's password
|
|
25
|
-
*/
|
|
26
|
-
changePassword(request: ChangePasswordRequest): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Retrieve user details
|
|
29
|
-
*/
|
|
30
|
-
getUser(request: GetUserRequest): Promise<GetUserResponse>;
|
|
31
|
-
/**
|
|
32
|
-
* Refresh a user's tokens
|
|
33
|
-
*/
|
|
34
|
-
refreshToken(request: RefreshTokenRequest): Promise<RefreshTokenResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* Respond to an auth challenge
|
|
37
|
-
*/
|
|
38
|
-
respondToAuthChallenge(request: RespondToAuthChallengeRequest): Promise<any>;
|
|
39
|
-
/**
|
|
40
|
-
* Reset a user's password
|
|
41
|
-
*/
|
|
42
|
-
resetPassword(request: SetPasswordRequest): Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
export interface HealthcheckResponse {
|
|
45
|
-
status: string;
|
|
46
|
-
}
|
|
File without changes
|
|
File without changes
|