@fiado/api-invoker 5.124.0 → 5.125.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 -1
- package/bin/loanCredit/api/LoanCreditBusinessApi.js +4 -0
- package/bin/loanCredit/api/interfaces/ILoanCreditBusinessApi.d.ts +6 -1
- package/package.json +2 -2
- package/src/loanCredit/api/LoanCreditBusinessApi.ts +11 -0
- package/src/loanCredit/api/interfaces/ILoanCreditBusinessApi.ts +12 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
3
|
-
import { ActivationCheckRequest, ActivationCheckResponse, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, SignLoanCreditResponse, UpdateLoanBorrowerSciRequest, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
3
|
+
import { ActivationCheckRequest, ActivationCheckResponse, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, SignLoanCreditResponse, PreviewLoanContractRequest, LoanContractPreview, UpdateLoanBorrowerSciRequest, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
4
4
|
import { CreditSummariesBatchRequest, CreditSummariesBatchResponse } from "./dtos/CreditSummariesBatch.js";
|
|
5
5
|
import { LoanCreditAnalyticsBatchRequest, LoanCreditAnalyticsBatchResponse } from "./dtos/LoanCreditAnalyticsBatch.js";
|
|
6
6
|
import { CustomerCreditHistoryResponse } from "./dtos/CustomerCreditHistory.js";
|
|
@@ -25,6 +25,7 @@ export default class LoanCreditBusinessApi implements ILoanCreditBusinessApi {
|
|
|
25
25
|
originate(input: OriginateLoanCreditRequest, tenantId: string): Promise<StandardResponse<OriginateLoanCreditResponse>>;
|
|
26
26
|
quote(creditId: string, input: QuoteLoanCreditRequest, tenantId: string): Promise<StandardResponse<QuoteLoanCreditResponse>>;
|
|
27
27
|
sign(creditId: string, input: SignLoanCreditRequest, tenantId: string): Promise<StandardResponse<SignLoanCreditResponse>>;
|
|
28
|
+
previewContract(creditId: string, input: PreviewLoanContractRequest, tenantId: string): Promise<StandardResponse<LoanContractPreview>>;
|
|
28
29
|
applyPayment(creditId: string, input: CreditPaymentAppliedRequest, tenantId: string): Promise<StandardResponse<CreditPaymentAppliedResponse>>;
|
|
29
30
|
settle(creditId: string, input: CreditSettledRequest, tenantId: string): Promise<StandardResponse<CreditSettledResponse>>;
|
|
30
31
|
activateCheck(creditId: string, input: ActivationCheckRequest, tenantId: string): Promise<StandardResponse<ActivationCheckResponse>>;
|
|
@@ -47,6 +47,10 @@ let LoanCreditBusinessApi = class LoanCreditBusinessApi {
|
|
|
47
47
|
const url = `${this.baseUrl}/private/credits/${encodeURIComponent(creditId)}/sign?tenantId=${encodeURIComponent(tenantId)}`;
|
|
48
48
|
return await this.httpRequest.post(url, input);
|
|
49
49
|
}
|
|
50
|
+
async previewContract(creditId, input, tenantId) {
|
|
51
|
+
const url = `${this.baseUrl}/private/credits/${encodeURIComponent(creditId)}/contract/preview?tenantId=${encodeURIComponent(tenantId)}`;
|
|
52
|
+
return await this.httpRequest.post(url, input);
|
|
53
|
+
}
|
|
50
54
|
async applyPayment(creditId, input, tenantId) {
|
|
51
55
|
const url = `${this.baseUrl}/private/credits/${encodeURIComponent(creditId)}/payment-applied?tenantId=${encodeURIComponent(tenantId)}`;
|
|
52
56
|
return await this.httpRequest.post(url, input);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { ActivationCheckRequest, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, ActivationCheckResponse, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, SignLoanCreditResponse, UpdateLoanBorrowerSciRequest, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
2
|
+
import { ActivationCheckRequest, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, ActivationCheckResponse, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, PreviewLoanContractRequest, LoanContractPreview, SignLoanCreditResponse, UpdateLoanBorrowerSciRequest, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
3
3
|
import { CreditSummariesBatchRequest, CreditSummariesBatchResponse } from "../dtos/CreditSummariesBatch.js";
|
|
4
4
|
import { LoanCreditAnalyticsBatchRequest, LoanCreditAnalyticsBatchResponse } from "../dtos/LoanCreditAnalyticsBatch.js";
|
|
5
5
|
import { CustomerCreditHistoryResponse } from "../dtos/CustomerCreditHistory.js";
|
|
@@ -40,6 +40,11 @@ export interface ILoanCreditBusinessApi {
|
|
|
40
40
|
* `activationChecklist.contractSigned = true`).
|
|
41
41
|
*/
|
|
42
42
|
sign(creditId: string, input: SignLoanCreditRequest, tenantId: string): Promise<StandardResponse<SignLoanCreditResponse>>;
|
|
43
|
+
/**
|
|
44
|
+
* Paso 08 — vista previa del contrato antes de enviar el código de firma: mismo contenido que el
|
|
45
|
+
* contrato que se firmará, sin iniciar la firma ni guardar evidencia. Devuelve un enlace temporal.
|
|
46
|
+
*/
|
|
47
|
+
previewContract(creditId: string, input: PreviewLoanContractRequest, tenantId: string): Promise<StandardResponse<LoanContractPreview>>;
|
|
43
48
|
/**
|
|
44
49
|
* Marca condiciones del checklist de activación (M2 §5): `downPayment` (paso 07),
|
|
45
50
|
* `imeiEnrolled`/`lockVerified` (paso 09, dispara el MDM vía abstracción). Con las 4 en `true`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.125.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.14.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.533.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -18,6 +18,8 @@ import {
|
|
|
18
18
|
QuoteLoanCreditResponse,
|
|
19
19
|
SignLoanCreditRequest,
|
|
20
20
|
SignLoanCreditResponse,
|
|
21
|
+
PreviewLoanContractRequest,
|
|
22
|
+
LoanContractPreview,
|
|
21
23
|
UpdateLoanBorrowerSciRequest,
|
|
22
24
|
UpsertLoanBorrowerRequest,
|
|
23
25
|
LoanBorrowerCreditItem,
|
|
@@ -96,6 +98,15 @@ export default class LoanCreditBusinessApi implements ILoanCreditBusinessApi {
|
|
|
96
98
|
return await this.httpRequest.post(url, input);
|
|
97
99
|
}
|
|
98
100
|
|
|
101
|
+
async previewContract(
|
|
102
|
+
creditId: string,
|
|
103
|
+
input: PreviewLoanContractRequest,
|
|
104
|
+
tenantId: string,
|
|
105
|
+
): Promise<StandardResponse<LoanContractPreview>> {
|
|
106
|
+
const url = `${this.baseUrl}/private/credits/${encodeURIComponent(creditId)}/contract/preview?tenantId=${encodeURIComponent(tenantId)}`;
|
|
107
|
+
return await this.httpRequest.post(url, input);
|
|
108
|
+
}
|
|
109
|
+
|
|
99
110
|
async applyPayment(
|
|
100
111
|
creditId: string,
|
|
101
112
|
input: CreditPaymentAppliedRequest,
|
|
@@ -15,6 +15,8 @@ import {
|
|
|
15
15
|
QuoteLoanCreditRequest,
|
|
16
16
|
QuoteLoanCreditResponse,
|
|
17
17
|
SignLoanCreditRequest,
|
|
18
|
+
PreviewLoanContractRequest,
|
|
19
|
+
LoanContractPreview,
|
|
18
20
|
SignLoanCreditResponse,
|
|
19
21
|
UpdateLoanBorrowerSciRequest,
|
|
20
22
|
UpsertLoanBorrowerRequest,
|
|
@@ -92,6 +94,16 @@ export interface ILoanCreditBusinessApi {
|
|
|
92
94
|
tenantId: string,
|
|
93
95
|
): Promise<StandardResponse<SignLoanCreditResponse>>;
|
|
94
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Paso 08 — vista previa del contrato antes de enviar el código de firma: mismo contenido que el
|
|
99
|
+
* contrato que se firmará, sin iniciar la firma ni guardar evidencia. Devuelve un enlace temporal.
|
|
100
|
+
*/
|
|
101
|
+
previewContract(
|
|
102
|
+
creditId: string,
|
|
103
|
+
input: PreviewLoanContractRequest,
|
|
104
|
+
tenantId: string,
|
|
105
|
+
): Promise<StandardResponse<LoanContractPreview>>;
|
|
106
|
+
|
|
95
107
|
/**
|
|
96
108
|
* Marca condiciones del checklist de activación (M2 §5): `downPayment` (paso 07),
|
|
97
109
|
* `imeiEnrolled`/`lockVerified` (paso 09, dispara el MDM vía abstracción). Con las 4 en `true`
|