@fiado/api-invoker 3.0.36 → 3.0.39
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/.claude/settings.json +33 -0
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +46 -0
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +2 -0
- package/bin/contract-business/api/ContractBusinessApi.d.ts +2 -1
- package/bin/contract-business/api/ContractBusinessApi.js +3 -2
- package/bin/contract-business/api/interfaces/IContractBusinessApi.d.ts +2 -1
- package/bin/estafeta/EstafetaApi.d.ts +0 -0
- package/bin/estafeta/EstafetaApi.js +0 -0
- package/bin/report-processor-business/api/IReportProcessorBusiness.d.ts +3 -0
- package/bin/report-processor-business/api/IReportProcessorBusiness.js +2 -0
- package/bin/transaction/api/TransactionApi.d.ts +11 -0
- package/bin/transaction/api/TransactionApi.js +20 -0
- package/bin/transaction/api/interfaces/ITransactionApi.d.ts +11 -0
- package/package.json +2 -2
- package/src/contract-business/api/ContractBusinessApi.ts +4 -2
- package/src/contract-business/api/interfaces/IContractBusinessApi.ts +2 -1
- package/src/transaction/api/TransactionApi.ts +30 -2
- package/src/transaction/api/interfaces/ITransactionApi.ts +13 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(npx tsc:*)",
|
|
5
|
+
"Bash(find node_modules/@fiado/type-kit/bin/credit -name *.d.ts)",
|
|
6
|
+
"mcp__fiado-mcp-server__get_type_kit_domain",
|
|
7
|
+
"mcp__fiado-mcp-server__search_type_kit",
|
|
8
|
+
"Bash(find /Users/yhon/fsrc/fiado-api-invoker/node_modules/@fiado/type-kit/bin -name *QueueMessage* -o -name *Publisher*)",
|
|
9
|
+
"Bash(ls -la /Users/yhon/fsrc/fiado-api-invoker/*.md)",
|
|
10
|
+
"Bash(ls -1d */)",
|
|
11
|
+
"Bash(for dir:*)",
|
|
12
|
+
"Bash(do echo:*)",
|
|
13
|
+
"Read(//Users/yhon/fsrc/fiado-api-invoker/**)",
|
|
14
|
+
"Bash(done)",
|
|
15
|
+
"Bash(grep \"\\\\.ts$\")",
|
|
16
|
+
"Read(//Users/yhon/fsrc/fiado-type-kit/src/credit/**)",
|
|
17
|
+
"Read(//Users/yhon/fsrc/type-kit/src/**)",
|
|
18
|
+
"Read(//Users/yhon/fsrc/**)",
|
|
19
|
+
"Bash(git commit:*)",
|
|
20
|
+
"Bash(npm publish:*)",
|
|
21
|
+
"Bash(git push:*)",
|
|
22
|
+
"Bash(git -C /Users/yhon/fsrc/fiado-type-kit push origin develop)",
|
|
23
|
+
"Bash(npm install:*)",
|
|
24
|
+
"Bash(git add:*)"
|
|
25
|
+
],
|
|
26
|
+
"additionalDirectories": [
|
|
27
|
+
"/Users/yhon/fsrc/fiado-type-kit/src/credit/dtos",
|
|
28
|
+
"/Users/yhon/fsrc/fiado-type-kit/src/credit",
|
|
29
|
+
"/Users/yhon/fsrc/fiado-type-kit/bin/credit/dtos/internal",
|
|
30
|
+
"/Users/yhon/fsrc/fiado-type-kit"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
}
|
|
@@ -4,7 +4,8 @@ export default class ContractBusinessApi implements IContractBusinessApi {
|
|
|
4
4
|
private httpRequest;
|
|
5
5
|
private readonly baseUrl;
|
|
6
6
|
constructor(httpRequest: IHttpRequest);
|
|
7
|
-
|
|
7
|
+
signDocument(params: {
|
|
8
|
+
documentType: string;
|
|
8
9
|
directoryId: string;
|
|
9
10
|
peopleId: string;
|
|
10
11
|
folio: string;
|
|
@@ -18,8 +18,9 @@ let ContractBusinessApi = class ContractBusinessApi {
|
|
|
18
18
|
this.httpRequest = httpRequest;
|
|
19
19
|
this.baseUrl = process.env.CONTRACT_BUSINESS_LAMBDA_URL || "";
|
|
20
20
|
}
|
|
21
|
-
async
|
|
22
|
-
|
|
21
|
+
async signDocument(params) {
|
|
22
|
+
const { documentType, ...body } = params;
|
|
23
|
+
return await this.httpRequest.post(`${this.baseUrl}/sign/${documentType}`, body);
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
26
|
ContractBusinessApi = __decorate([
|
|
File without changes
|
|
File without changes
|
|
@@ -52,4 +52,15 @@ export default class TransactionApi implements ITransactionApi {
|
|
|
52
52
|
startDate?: string;
|
|
53
53
|
endDate?: string;
|
|
54
54
|
}): Promise<FiadoApiResponse<TransactionGetResponse>>;
|
|
55
|
+
getTransactionByProviderIdAndDirectoryId(params: {
|
|
56
|
+
providerId: Provider;
|
|
57
|
+
directoryId: string;
|
|
58
|
+
page?: string;
|
|
59
|
+
pageSize?: string;
|
|
60
|
+
startDate?: string;
|
|
61
|
+
endDate?: string;
|
|
62
|
+
raw?: string;
|
|
63
|
+
index?: string;
|
|
64
|
+
pocket?: boolean;
|
|
65
|
+
}): Promise<any>;
|
|
55
66
|
}
|
|
@@ -90,6 +90,26 @@ let TransactionApi = class TransactionApi {
|
|
|
90
90
|
const url = `${this.baseUrl}private/transaction/${params.source}/renewals?${queryParams.join('&')}`;
|
|
91
91
|
return await this.httpRequest.get(url);
|
|
92
92
|
}
|
|
93
|
+
async getTransactionByProviderIdAndDirectoryId(params) {
|
|
94
|
+
let queryParams = [];
|
|
95
|
+
if (params.page)
|
|
96
|
+
queryParams.push(`page=${params.page}`);
|
|
97
|
+
if (params.pageSize)
|
|
98
|
+
queryParams.push(`pageSize=${params.pageSize}`);
|
|
99
|
+
if (params.startDate)
|
|
100
|
+
queryParams.push(`startDate=${params.startDate}`);
|
|
101
|
+
if (params.endDate)
|
|
102
|
+
queryParams.push(`endDate=${params.endDate}`);
|
|
103
|
+
if (params.raw)
|
|
104
|
+
queryParams.push(`raw=${params.raw}`);
|
|
105
|
+
if (params.index)
|
|
106
|
+
queryParams.push(`index=${params.index}`);
|
|
107
|
+
if (params.pocket !== undefined)
|
|
108
|
+
queryParams.push(`pocket=${params.pocket}`);
|
|
109
|
+
const queryString = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
|
|
110
|
+
const url = `${this.baseUrl}private/provider/${params.providerId}/${params.directoryId}/transactions${queryString}`;
|
|
111
|
+
return await this.httpRequest.get(url);
|
|
112
|
+
}
|
|
93
113
|
};
|
|
94
114
|
TransactionApi = __decorate([
|
|
95
115
|
(0, inversify_1.injectable)(),
|
|
@@ -47,4 +47,15 @@ export interface ITransactionApi {
|
|
|
47
47
|
startDate?: string;
|
|
48
48
|
endDate?: string;
|
|
49
49
|
}): Promise<FiadoApiResponse<TransactionGetResponse>>;
|
|
50
|
+
getTransactionByProviderIdAndDirectoryId(params: {
|
|
51
|
+
providerId: Provider;
|
|
52
|
+
directoryId: string;
|
|
53
|
+
page?: string;
|
|
54
|
+
pageSize?: string;
|
|
55
|
+
startDate?: string;
|
|
56
|
+
endDate?: string;
|
|
57
|
+
raw?: string;
|
|
58
|
+
index?: string;
|
|
59
|
+
pocket?: boolean;
|
|
60
|
+
}): Promise<any>;
|
|
50
61
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.39",
|
|
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": "^3.1.
|
|
19
|
+
"@fiado/type-kit": "^3.1.8",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"i": "^0.3.7",
|
|
22
22
|
"inversify": "^6.2.2",
|
|
@@ -10,12 +10,14 @@ export default class ContractBusinessApi implements IContractBusinessApi {
|
|
|
10
10
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
async
|
|
13
|
+
async signDocument(params: {
|
|
14
|
+
documentType: string;
|
|
14
15
|
directoryId: string;
|
|
15
16
|
peopleId: string;
|
|
16
17
|
folio: string;
|
|
17
18
|
sessionId: string;
|
|
18
19
|
}): Promise<any> {
|
|
19
|
-
|
|
20
|
+
const { documentType, ...body } = params;
|
|
21
|
+
return await this.httpRequest.post(`${this.baseUrl}/sign/${documentType}`, body);
|
|
20
22
|
}
|
|
21
23
|
}
|
|
@@ -99,7 +99,7 @@ export default class TransactionApi implements ITransactionApi {
|
|
|
99
99
|
async findExpiringPreAuthTransactions(
|
|
100
100
|
params: {
|
|
101
101
|
source?: TransactionSourceEnum,
|
|
102
|
-
provider: Provider,
|
|
102
|
+
provider: Provider,
|
|
103
103
|
index?: string | null,
|
|
104
104
|
pageSize?: string,
|
|
105
105
|
startDate?: string,
|
|
@@ -125,6 +125,34 @@ export default class TransactionApi implements ITransactionApi {
|
|
|
125
125
|
|
|
126
126
|
const url: string = `${this.baseUrl}private/transaction/${params.source}/renewals?${queryParams.join('&')}`;
|
|
127
127
|
|
|
128
|
-
return await this.httpRequest.get(url);
|
|
128
|
+
return await this.httpRequest.get(url);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
async getTransactionByProviderIdAndDirectoryId(params: {
|
|
132
|
+
providerId: Provider;
|
|
133
|
+
directoryId: string;
|
|
134
|
+
page?: string;
|
|
135
|
+
pageSize?: string;
|
|
136
|
+
startDate?: string;
|
|
137
|
+
endDate?: string;
|
|
138
|
+
raw?: string;
|
|
139
|
+
index?: string;
|
|
140
|
+
pocket?: boolean;
|
|
141
|
+
}): Promise<any> {
|
|
142
|
+
|
|
143
|
+
let queryParams = [];
|
|
144
|
+
|
|
145
|
+
if (params.page) queryParams.push(`page=${params.page}`);
|
|
146
|
+
if (params.pageSize) queryParams.push(`pageSize=${params.pageSize}`);
|
|
147
|
+
if (params.startDate) queryParams.push(`startDate=${params.startDate}`);
|
|
148
|
+
if (params.endDate) queryParams.push(`endDate=${params.endDate}`);
|
|
149
|
+
if (params.raw) queryParams.push(`raw=${params.raw}`);
|
|
150
|
+
if (params.index) queryParams.push(`index=${params.index}`);
|
|
151
|
+
if (params.pocket !== undefined) queryParams.push(`pocket=${params.pocket}`);
|
|
152
|
+
|
|
153
|
+
const queryString = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
|
|
154
|
+
const url: string = `${this.baseUrl}private/provider/${params.providerId}/${params.directoryId}/transactions${queryString}`;
|
|
155
|
+
|
|
156
|
+
return await this.httpRequest.get(url);
|
|
129
157
|
}
|
|
130
158
|
}
|
|
@@ -65,7 +65,19 @@ export interface ITransactionApi {
|
|
|
65
65
|
index?: string | null,
|
|
66
66
|
pageSize?: string,
|
|
67
67
|
startDate?: string,
|
|
68
|
-
endDate?: string,
|
|
68
|
+
endDate?: string,
|
|
69
69
|
}
|
|
70
70
|
): Promise<FiadoApiResponse<TransactionGetResponse>>;
|
|
71
|
+
|
|
72
|
+
getTransactionByProviderIdAndDirectoryId(params: {
|
|
73
|
+
providerId: Provider;
|
|
74
|
+
directoryId: string;
|
|
75
|
+
page?: string;
|
|
76
|
+
pageSize?: string;
|
|
77
|
+
startDate?: string;
|
|
78
|
+
endDate?: string;
|
|
79
|
+
raw?: string;
|
|
80
|
+
index?: string;
|
|
81
|
+
pocket?: boolean;
|
|
82
|
+
}): Promise<any>;
|
|
71
83
|
}
|