@fiado/api-invoker 5.113.0 → 5.114.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/loanCredit/api/LoanCreditBusinessApi.d.ts +2 -0
- package/bin/loanCredit/api/LoanCreditBusinessApi.js +4 -0
- package/bin/loanCredit/api/dtos/CreditSummariesBatch.d.ts +11 -0
- package/bin/loanCredit/api/dtos/CreditSummariesBatch.js +1 -0
- package/bin/loanCredit/api/interfaces/ILoanCreditBusinessApi.d.ts +7 -0
- package/bin/loanCredit/index.d.ts +1 -0
- package/bin/loanCredit/index.js +1 -0
- package/package.json +1 -1
- package/src/loanCredit/api/LoanCreditBusinessApi.ts +12 -0
- package/src/loanCredit/api/dtos/CreditSummariesBatch.ts +14 -0
- package/src/loanCredit/api/interfaces/ILoanCreditBusinessApi.ts +14 -0
- package/src/loanCredit/index.ts +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
3
3
|
import { ActivationCheckRequest, ActivationCheckResponse, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, SignLoanCreditResponse, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
4
|
+
import { CreditSummariesBatchRequest, CreditSummariesBatchResponse } from "./dtos/CreditSummariesBatch.js";
|
|
4
5
|
import { LoanCreditAnalyticsBatchRequest, LoanCreditAnalyticsBatchResponse } from "./dtos/LoanCreditAnalyticsBatch.js";
|
|
5
6
|
import { CustomerCreditHistoryResponse } from "./dtos/CustomerCreditHistory.js";
|
|
6
7
|
import { CreditLifecycleFactRequest, CreditLifecycleFactResponse } from "./dtos/CreditLifecycleFact.js";
|
|
@@ -32,6 +33,7 @@ export default class LoanCreditBusinessApi implements ILoanCreditBusinessApi {
|
|
|
32
33
|
getBorrowerByRetailCustomer(retailCustomerId: string, tenantId: string): Promise<StandardResponse<LoanBorrowerResponse>>;
|
|
33
34
|
getCustomerCreditHistory(retailCustomerId: string, tenantId: string): Promise<StandardResponse<CustomerCreditHistoryResponse>>;
|
|
34
35
|
batchGetCreditAnalytics(input: LoanCreditAnalyticsBatchRequest, tenantId: string): Promise<StandardResponse<LoanCreditAnalyticsBatchResponse>>;
|
|
36
|
+
batchGetCreditSummaries(input: CreditSummariesBatchRequest, tenantId: string): Promise<StandardResponse<CreditSummariesBatchResponse>>;
|
|
35
37
|
upsertBorrower(input: UpsertLoanBorrowerRequest, tenantId: string): Promise<StandardResponse<LoanBorrowerResponse>>;
|
|
36
38
|
notifyLifecycleFact(creditId: string, input: CreditLifecycleFactRequest, tenantId: string): Promise<StandardResponse<CreditLifecycleFactResponse>>;
|
|
37
39
|
listMessagingCandidates(input: ListMessagingCandidatesRequest, tenantId: string): Promise<StandardResponse<ListMessagingCandidatesResponse>>;
|
|
@@ -74,6 +74,10 @@ let LoanCreditBusinessApi = class LoanCreditBusinessApi {
|
|
|
74
74
|
const url = `${this.baseUrl}/private/credits/analytics?tenantId=${encodeURIComponent(tenantId)}`;
|
|
75
75
|
return await this.httpRequest.post(url, input);
|
|
76
76
|
}
|
|
77
|
+
async batchGetCreditSummaries(input, tenantId) {
|
|
78
|
+
const url = `${this.baseUrl}/private/borrowers/credit-summaries?tenantId=${encodeURIComponent(tenantId)}`;
|
|
79
|
+
return await this.httpRequest.post(url, input);
|
|
80
|
+
}
|
|
77
81
|
async upsertBorrower(input, tenantId) {
|
|
78
82
|
const url = `${this.baseUrl}/private/borrowers?tenantId=${encodeURIComponent(tenantId)}`;
|
|
79
83
|
return await this.httpRequest.post(url, input);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CreditCustomerListItem } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
2
|
+
/** Body de `POST /private/borrowers/credit-summaries`. Hasta 100 ids por request; el caller pagina. */
|
|
3
|
+
export interface CreditSummariesBatchRequest {
|
|
4
|
+
retailCustomerIds: string[];
|
|
5
|
+
}
|
|
6
|
+
/** Bloque de crédito de un cliente retail, el mismo que pinta la tabla Clientes del backoffice. */
|
|
7
|
+
export type CreditSummaryItem = Pick<CreditCustomerListItem, "retailCustomerId" | "credit">;
|
|
8
|
+
/** Response de `POST /private/borrowers/credit-summaries`: un ítem por id pedido, en el mismo orden. */
|
|
9
|
+
export interface CreditSummariesBatchResponse {
|
|
10
|
+
items: CreditSummaryItem[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
2
|
import { ActivationCheckRequest, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, ActivationCheckResponse, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, SignLoanCreditResponse, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
3
|
+
import { CreditSummariesBatchRequest, CreditSummariesBatchResponse } from "../dtos/CreditSummariesBatch.js";
|
|
3
4
|
import { LoanCreditAnalyticsBatchRequest, LoanCreditAnalyticsBatchResponse } from "../dtos/LoanCreditAnalyticsBatch.js";
|
|
4
5
|
import { CustomerCreditHistoryResponse } from "../dtos/CustomerCreditHistory.js";
|
|
5
6
|
import { CreditLifecycleFactRequest, CreditLifecycleFactResponse } from "../dtos/CreditLifecycleFact.js";
|
|
@@ -91,6 +92,12 @@ export interface ILoanCreditBusinessApi {
|
|
|
91
92
|
* `400 VALIDATION_ERROR` si el lote pasa de 500 ids o trae uno que no es ULID.
|
|
92
93
|
*/
|
|
93
94
|
batchGetCreditAnalytics(input: LoanCreditAnalyticsBatchRequest, tenantId: string): Promise<StandardResponse<LoanCreditAnalyticsBatchResponse>>;
|
|
95
|
+
/**
|
|
96
|
+
* Bloque de crédito (nivel SK, conteos, saldo, mora) de hasta 100 clientes retail en lote. Un ítem
|
|
97
|
+
* por id pedido, en el mismo orden; `credit.state` distingue «sin acreditado» de «no se pudo leer».
|
|
98
|
+
* `400 VALIDATION_ERROR` si el lote viene vacío, repite ids o pasa de 100.
|
|
99
|
+
*/
|
|
100
|
+
batchGetCreditSummaries(input: CreditSummariesBatchRequest, tenantId: string): Promise<StandardResponse<CreditSummariesBatchResponse>>;
|
|
94
101
|
/**
|
|
95
102
|
* Upsert idempotente del acreditado por `retailCustomerId` (mismo contrato que el consumidor
|
|
96
103
|
* del evento `CustomerKycVerifiedV1` — fallback operativo mientras la cola no exista).
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./api/dtos/CreditLifecycleFact.js";
|
|
2
2
|
export * from "./api/dtos/CustomerCreditHistory.js";
|
|
3
|
+
export * from "./api/dtos/CreditSummariesBatch.js";
|
|
3
4
|
export * from "./api/dtos/LoanCreditAnalyticsBatch.js";
|
|
4
5
|
export * from "./api/interfaces/ILoanCreditBusinessApi.js";
|
|
5
6
|
export { default as LoanCreditBusinessApi } from "./api/LoanCreditBusinessApi.js";
|
package/bin/loanCredit/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./api/dtos/CreditLifecycleFact.js";
|
|
2
2
|
export * from "./api/dtos/CustomerCreditHistory.js";
|
|
3
|
+
export * from "./api/dtos/CreditSummariesBatch.js";
|
|
3
4
|
export * from "./api/dtos/LoanCreditAnalyticsBatch.js";
|
|
4
5
|
export * from "./api/interfaces/ILoanCreditBusinessApi.js";
|
|
5
6
|
export { default as LoanCreditBusinessApi } from "./api/LoanCreditBusinessApi.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.114.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",
|
|
@@ -29,6 +29,10 @@ import {
|
|
|
29
29
|
LoanCustomerPaymentOptions,
|
|
30
30
|
LoanCustomerPaymentResult,
|
|
31
31
|
} from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
32
|
+
import {
|
|
33
|
+
CreditSummariesBatchRequest,
|
|
34
|
+
CreditSummariesBatchResponse,
|
|
35
|
+
} from "./dtos/CreditSummariesBatch.js";
|
|
32
36
|
import {
|
|
33
37
|
LoanCreditAnalyticsBatchRequest,
|
|
34
38
|
LoanCreditAnalyticsBatchResponse,
|
|
@@ -152,6 +156,14 @@ export default class LoanCreditBusinessApi implements ILoanCreditBusinessApi {
|
|
|
152
156
|
return await this.httpRequest.post(url, input);
|
|
153
157
|
}
|
|
154
158
|
|
|
159
|
+
async batchGetCreditSummaries(
|
|
160
|
+
input: CreditSummariesBatchRequest,
|
|
161
|
+
tenantId: string,
|
|
162
|
+
): Promise<StandardResponse<CreditSummariesBatchResponse>> {
|
|
163
|
+
const url = `${this.baseUrl}/private/borrowers/credit-summaries?tenantId=${encodeURIComponent(tenantId)}`;
|
|
164
|
+
return await this.httpRequest.post(url, input);
|
|
165
|
+
}
|
|
166
|
+
|
|
155
167
|
async upsertBorrower(
|
|
156
168
|
input: UpsertLoanBorrowerRequest,
|
|
157
169
|
tenantId: string,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CreditCustomerListItem } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
2
|
+
|
|
3
|
+
/** Body de `POST /private/borrowers/credit-summaries`. Hasta 100 ids por request; el caller pagina. */
|
|
4
|
+
export interface CreditSummariesBatchRequest {
|
|
5
|
+
retailCustomerIds: string[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** Bloque de crédito de un cliente retail, el mismo que pinta la tabla Clientes del backoffice. */
|
|
9
|
+
export type CreditSummaryItem = Pick<CreditCustomerListItem, "retailCustomerId" | "credit">;
|
|
10
|
+
|
|
11
|
+
/** Response de `POST /private/borrowers/credit-summaries`: un ítem por id pedido, en el mismo orden. */
|
|
12
|
+
export interface CreditSummariesBatchResponse {
|
|
13
|
+
items: CreditSummaryItem[];
|
|
14
|
+
}
|
|
@@ -27,6 +27,10 @@ import {
|
|
|
27
27
|
LoanCustomerPaymentOptions,
|
|
28
28
|
LoanCustomerPaymentResult,
|
|
29
29
|
} from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
30
|
+
import {
|
|
31
|
+
CreditSummariesBatchRequest,
|
|
32
|
+
CreditSummariesBatchResponse,
|
|
33
|
+
} from "../dtos/CreditSummariesBatch.js";
|
|
30
34
|
import {
|
|
31
35
|
LoanCreditAnalyticsBatchRequest,
|
|
32
36
|
LoanCreditAnalyticsBatchResponse,
|
|
@@ -174,6 +178,16 @@ export interface ILoanCreditBusinessApi {
|
|
|
174
178
|
tenantId: string,
|
|
175
179
|
): Promise<StandardResponse<LoanCreditAnalyticsBatchResponse>>;
|
|
176
180
|
|
|
181
|
+
/**
|
|
182
|
+
* Bloque de crédito (nivel SK, conteos, saldo, mora) de hasta 100 clientes retail en lote. Un ítem
|
|
183
|
+
* por id pedido, en el mismo orden; `credit.state` distingue «sin acreditado» de «no se pudo leer».
|
|
184
|
+
* `400 VALIDATION_ERROR` si el lote viene vacío, repite ids o pasa de 100.
|
|
185
|
+
*/
|
|
186
|
+
batchGetCreditSummaries(
|
|
187
|
+
input: CreditSummariesBatchRequest,
|
|
188
|
+
tenantId: string,
|
|
189
|
+
): Promise<StandardResponse<CreditSummariesBatchResponse>>;
|
|
190
|
+
|
|
177
191
|
/**
|
|
178
192
|
* Upsert idempotente del acreditado por `retailCustomerId` (mismo contrato que el consumidor
|
|
179
193
|
* del evento `CustomerKycVerifiedV1` — fallback operativo mientras la cola no exista).
|
package/src/loanCredit/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./api/dtos/CreditLifecycleFact.js";
|
|
2
2
|
export * from "./api/dtos/CustomerCreditHistory.js";
|
|
3
|
+
export * from "./api/dtos/CreditSummariesBatch.js";
|
|
3
4
|
export * from "./api/dtos/LoanCreditAnalyticsBatch.js";
|
|
4
5
|
export * from "./api/interfaces/ILoanCreditBusinessApi.js";
|
|
5
6
|
export { default as LoanCreditBusinessApi } from "./api/LoanCreditBusinessApi.js";
|