@fiado/api-invoker 1.5.17 → 1.5.19
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/bin/event-history-business/EventHistoryApi.js +29 -4
- package/package.json +2 -2
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +21 -1
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +12 -3
- package/src/event-history-business/EventHistoryApi.ts +40 -5
- 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
|
}
|
|
@@ -35,9 +35,21 @@ let EventHistoryApi = class EventHistoryApi {
|
|
|
35
35
|
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
36
36
|
*/
|
|
37
37
|
async findDirectoryUserEventsByDirectoryId(directoryId, periodDate, index, pageSize) {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
const queryParams = [];
|
|
39
|
+
if (directoryId) {
|
|
40
|
+
queryParams.push(`directoryId=${directoryId}`);
|
|
41
|
+
}
|
|
42
|
+
if (periodDate) {
|
|
43
|
+
queryParams.push(`periodDate=${periodDate}`);
|
|
44
|
+
}
|
|
45
|
+
if (pageSize) {
|
|
46
|
+
queryParams.push(`pageSize=${pageSize}`);
|
|
47
|
+
}
|
|
48
|
+
if (index) {
|
|
49
|
+
queryParams.push(`index=${index}`);
|
|
50
|
+
}
|
|
51
|
+
const url = `${this.baseUrl}directoryuser/events/search?${queryParams.join('&')}`;
|
|
52
|
+
return await this.httpRequest.get(`${url}`);
|
|
41
53
|
}
|
|
42
54
|
/**
|
|
43
55
|
* Crea un evento de cambio asociado a un Directorio o Usuario.
|
|
@@ -60,7 +72,20 @@ let EventHistoryApi = class EventHistoryApi {
|
|
|
60
72
|
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
61
73
|
*/
|
|
62
74
|
async findAccountEventsByDirectoryId(directoryId, periodDate, index, pageSize) {
|
|
63
|
-
const
|
|
75
|
+
const queryParams = [];
|
|
76
|
+
if (directoryId) {
|
|
77
|
+
queryParams.push(`directoryId=${directoryId}`);
|
|
78
|
+
}
|
|
79
|
+
if (periodDate) {
|
|
80
|
+
queryParams.push(`periodDate=${periodDate}`);
|
|
81
|
+
}
|
|
82
|
+
if (pageSize) {
|
|
83
|
+
queryParams.push(`pageSize=${pageSize}`);
|
|
84
|
+
}
|
|
85
|
+
if (index) {
|
|
86
|
+
queryParams.push(`index=${index}`);
|
|
87
|
+
}
|
|
88
|
+
const url = `${this.baseUrl}accounts/events/search?${queryParams.join('&')}`;
|
|
64
89
|
return await this.httpRequest.get(`${url}`);
|
|
65
90
|
}
|
|
66
91
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.19",
|
|
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",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@fiado/gateway-adapter": "^1.1.50",
|
|
17
17
|
"@fiado/http-client": "^1.0.7",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^2.
|
|
19
|
+
"@fiado/type-kit": "^2.0.76",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
@@ -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
|
}
|
|
@@ -27,9 +27,26 @@ export class EventHistoryApi implements IEventHistoryApi {
|
|
|
27
27
|
*/
|
|
28
28
|
public async findDirectoryUserEventsByDirectoryId(directoryId: string, periodDate: string, index: string, pageSize: number): Promise<any> {
|
|
29
29
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const queryParams = []
|
|
31
|
+
|
|
32
|
+
if (directoryId) {
|
|
33
|
+
queryParams.push(`directoryId=${directoryId}`)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (periodDate) {
|
|
37
|
+
queryParams.push(`periodDate=${periodDate}`)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (pageSize) {
|
|
41
|
+
queryParams.push(`pageSize=${pageSize}`)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (index) {
|
|
45
|
+
queryParams.push(`index=${index}`)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const url = `${this.baseUrl}directoryuser/events/search?${queryParams.join('&')}`;
|
|
49
|
+
return await this.httpRequest.get(`${url}`);
|
|
33
50
|
}
|
|
34
51
|
|
|
35
52
|
/**
|
|
@@ -56,8 +73,26 @@ export class EventHistoryApi implements IEventHistoryApi {
|
|
|
56
73
|
*/
|
|
57
74
|
public async findAccountEventsByDirectoryId(directoryId: string, periodDate: string, index: string, pageSize: number): Promise<any> {
|
|
58
75
|
|
|
59
|
-
const
|
|
60
|
-
|
|
76
|
+
const queryParams = []
|
|
77
|
+
|
|
78
|
+
if (directoryId) {
|
|
79
|
+
queryParams.push(`directoryId=${directoryId}`)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (periodDate) {
|
|
83
|
+
queryParams.push(`periodDate=${periodDate}`)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (pageSize) {
|
|
87
|
+
queryParams.push(`pageSize=${pageSize}`)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (index) {
|
|
91
|
+
queryParams.push(`index=${index}`)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const url = `${this.baseUrl}accounts/events/search?${queryParams.join('&')}`;
|
|
95
|
+
return await this.httpRequest.get(`${url}`);
|
|
61
96
|
}
|
|
62
97
|
|
|
63
98
|
/**
|
|
@@ -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
|