@fiado/type-kit 3.210.0 → 3.212.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/directory/dtos/DeleteByDirectoryResponse.d.ts +10 -0
- package/bin/directory/dtos/DeleteByDirectoryResponse.js +27 -0
- package/bin/directory/index.d.ts +1 -0
- package/bin/directory/index.js +1 -0
- package/bin/loanCredit/dtos/LoanBorrower.d.ts +5 -2
- package/bin/loanCredit/dtos/LoanBorrower.js +1 -2
- package/bin/loanCredit/dtos/requests/SignLoanCreditRequest.d.ts +2 -2
- package/bin/loanCredit/dtos/requests/UpsertLoanBorrowerRequest.d.ts +11 -9
- package/bin/loanCredit/dtos/requests/UpsertLoanBorrowerRequest.js +10 -30
- package/bin/loanCredit/dtos/responses/LoanBorrowerResponse.d.ts +1 -1
- package/bin/platformRbac/dtos/CompleteMyProfileRequest.d.ts +9 -0
- package/bin/platformRbac/dtos/{ResendOtpRequest.js → CompleteMyProfileRequest.js} +12 -14
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +14 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +41 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +15 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +13 -0
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +3 -0
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +21 -0
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +7 -0
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +6 -0
- package/package.json +1 -1
- package/src/directory/dtos/DeleteByDirectoryResponse.ts +14 -0
- package/src/directory/index.ts +1 -0
- package/src/loanCredit/dtos/LoanBorrower.ts +5 -3
- package/src/loanCredit/dtos/requests/SignLoanCreditRequest.ts +2 -2
- package/src/loanCredit/dtos/requests/UpsertLoanBorrowerRequest.ts +12 -37
- package/src/loanCredit/dtos/responses/LoanBorrowerResponse.ts +1 -1
- package/bin/loanConfig/enums/ModifiableByRoleEnum.d.ts +0 -11
- package/bin/loanConfig/enums/ModifiableByRoleEnum.js +0 -15
- package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +0 -22
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +0 -11
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.js +0 -36
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Respuesta estándar del endpoint privado `privateDeleteByDirectoryId`
|
|
3
|
+
* (DELETE /private/directory/{directoryId}) que cada lambda de dominio expone
|
|
4
|
+
* para el borrado en cascada de todo su rastro asociado a un directoryId.
|
|
5
|
+
*
|
|
6
|
+
* Idempotente: si no hay registros para ese directoryId, deletedCount = 0.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DeleteByDirectoryResponse {
|
|
9
|
+
deletedCount: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DeleteByDirectoryResponse = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/**
|
|
15
|
+
* Respuesta estándar del endpoint privado `privateDeleteByDirectoryId`
|
|
16
|
+
* (DELETE /private/directory/{directoryId}) que cada lambda de dominio expone
|
|
17
|
+
* para el borrado en cascada de todo su rastro asociado a un directoryId.
|
|
18
|
+
*
|
|
19
|
+
* Idempotente: si no hay registros para ese directoryId, deletedCount = 0.
|
|
20
|
+
*/
|
|
21
|
+
class DeleteByDirectoryResponse {
|
|
22
|
+
}
|
|
23
|
+
exports.DeleteByDirectoryResponse = DeleteByDirectoryResponse;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsNumber)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], DeleteByDirectoryResponse.prototype, "deletedCount", void 0);
|
package/bin/directory/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './dtos/DirectoryBackofficeResponse';
|
|
|
5
5
|
export * from './dtos/DirectoryBackofficeUpdateRequest';
|
|
6
6
|
export * from './dtos/CreateDirectoryUserEventRequest';
|
|
7
7
|
export * from './dtos/CreateDirectoryUserEventResponse';
|
|
8
|
+
export * from './dtos/DeleteByDirectoryResponse';
|
|
8
9
|
export * from './dtos/External';
|
|
9
10
|
export * from './enums/TypeOfDirectoryId';
|
|
10
11
|
export * from './enums/DirectoryBackofficeStatusEnum';
|
package/bin/directory/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./dtos/DirectoryBackofficeResponse"), exports);
|
|
|
22
22
|
__exportStar(require("./dtos/DirectoryBackofficeUpdateRequest"), exports);
|
|
23
23
|
__exportStar(require("./dtos/CreateDirectoryUserEventRequest"), exports);
|
|
24
24
|
__exportStar(require("./dtos/CreateDirectoryUserEventResponse"), exports);
|
|
25
|
+
__exportStar(require("./dtos/DeleteByDirectoryResponse"), exports);
|
|
25
26
|
__exportStar(require("./dtos/External"), exports);
|
|
26
27
|
//enums
|
|
27
28
|
__exportStar(require("./enums/TypeOfDirectoryId"), exports);
|
|
@@ -9,8 +9,11 @@ export declare class LoanBorrower {
|
|
|
9
9
|
borrowerId: string;
|
|
10
10
|
/** FK al comprador de retail (`RetailCustomer` — owner retail-customer-business). */
|
|
11
11
|
retailCustomerId: string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* ANCLA canónica del acreditado: el directoryId de Fiado (identidad universal — L-hydrate,
|
|
14
|
+
* decisión 2026-07-22). `retailCustomerId` queda solo como referencia del tenant.
|
|
15
|
+
*/
|
|
16
|
+
directoryId: string;
|
|
14
17
|
/** SCI vigente 0-100 (M7). Ausente hasta la primera evaluación. */
|
|
15
18
|
sciScore?: number;
|
|
16
19
|
clientLevel?: ClientLevelEnum;
|
|
@@ -35,10 +35,9 @@ __decorate([
|
|
|
35
35
|
], LoanBorrower.prototype, "retailCustomerId", void 0);
|
|
36
36
|
__decorate([
|
|
37
37
|
(0, class_transformer_1.Expose)(),
|
|
38
|
-
(0, class_validator_1.IsOptional)(),
|
|
39
38
|
(0, class_validator_1.IsString)(),
|
|
40
39
|
__metadata("design:type", String)
|
|
41
|
-
], LoanBorrower.prototype, "
|
|
40
|
+
], LoanBorrower.prototype, "directoryId", void 0);
|
|
42
41
|
__decorate([
|
|
43
42
|
(0, class_transformer_1.Expose)(),
|
|
44
43
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -16,8 +16,8 @@ export declare class SignLoanCreditRequest {
|
|
|
16
16
|
otpCode?: string;
|
|
17
17
|
/**
|
|
18
18
|
* SOLO en el inicio de firma (tiempo 1) con el OTP REAL de messages-business: el directoryId
|
|
19
|
-
* Fiado del cliente (lo aporta el WIZARD — dueño del dato; fallback: el
|
|
20
|
-
*
|
|
19
|
+
* Fiado del cliente (lo aporta el WIZARD — dueño del dato; fallback: el directoryId
|
|
20
|
+
* (ancla) del borrower). El OTP se genera/verifica keyeado a este id (D5).
|
|
21
21
|
*/
|
|
22
22
|
otpDirectoryId?: string;
|
|
23
23
|
/**
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { ClientLevelEnum } from '../../../loanScoring/enums/ClientLevelEnum';
|
|
2
1
|
import { LoanBeneficiary } from '../LoanBeneficiary';
|
|
3
2
|
/**
|
|
4
|
-
* Body de POST /
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Body de `POST /private/borrowers` (loan-credit-business) — ALTA ON-DEMAND del acreditado
|
|
4
|
+
* (paso 04 del wizard, al elegir SureKeep como forma de pago — decisión 2026-07-22, L-hydrate).
|
|
5
|
+
*
|
|
6
|
+
* El wizard solo IDENTIFICA al cliente: el motor hace un pull síncrono a `retail-customer`
|
|
7
|
+
* (`GET /private/customers/:id`), valida `kycStatus=VERIFIED` + identidad Fiado presente, y
|
|
8
|
+
* persiste el acreditado con ancla `directoryId`. La PII del pull es TRANSITORIA (no se guarda).
|
|
9
|
+
*
|
|
10
|
+
* Idempotente: si el acreditado ya existe, se devuelve/completa (una persona = una ficha).
|
|
11
|
+
* Errores: `KYC_NOT_VERIFIED` · `IDENTITY_MISSING` · `BORROWER_SOURCE_NOT_FOUND` ·
|
|
12
|
+
* `RETAIL_PULL_FAILED` (422/502 — ver openapi del motor).
|
|
7
13
|
*/
|
|
8
14
|
export declare class UpsertLoanBorrowerRequest {
|
|
9
15
|
retailCustomerId: string;
|
|
10
|
-
/**
|
|
11
|
-
fiadoDirectoryId?: string;
|
|
12
|
-
sciScore?: number;
|
|
13
|
-
clientLevel?: ClientLevelEnum;
|
|
14
|
-
bureauScore?: number;
|
|
16
|
+
/** Beneficiario / a quién avisar (opcional — el wizard lo captura en su paso propio). */
|
|
15
17
|
beneficiary?: LoanBeneficiary;
|
|
16
18
|
}
|
|
@@ -12,12 +12,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.UpsertLoanBorrowerRequest = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const ClientLevelEnum_1 = require("../../../loanScoring/enums/ClientLevelEnum");
|
|
16
15
|
const LoanBeneficiary_1 = require("../LoanBeneficiary");
|
|
17
16
|
/**
|
|
18
|
-
* Body de POST /
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* Body de `POST /private/borrowers` (loan-credit-business) — ALTA ON-DEMAND del acreditado
|
|
18
|
+
* (paso 04 del wizard, al elegir SureKeep como forma de pago — decisión 2026-07-22, L-hydrate).
|
|
19
|
+
*
|
|
20
|
+
* El wizard solo IDENTIFICA al cliente: el motor hace un pull síncrono a `retail-customer`
|
|
21
|
+
* (`GET /private/customers/:id`), valida `kycStatus=VERIFIED` + identidad Fiado presente, y
|
|
22
|
+
* persiste el acreditado con ancla `directoryId`. La PII del pull es TRANSITORIA (no se guarda).
|
|
23
|
+
*
|
|
24
|
+
* Idempotente: si el acreditado ya existe, se devuelve/completa (una persona = una ficha).
|
|
25
|
+
* Errores: `KYC_NOT_VERIFIED` · `IDENTITY_MISSING` · `BORROWER_SOURCE_NOT_FOUND` ·
|
|
26
|
+
* `RETAIL_PULL_FAILED` (422/502 — ver openapi del motor).
|
|
21
27
|
*/
|
|
22
28
|
class UpsertLoanBorrowerRequest {
|
|
23
29
|
}
|
|
@@ -28,32 +34,6 @@ __decorate([
|
|
|
28
34
|
(0, class_validator_1.IsNotEmpty)(),
|
|
29
35
|
__metadata("design:type", String)
|
|
30
36
|
], UpsertLoanBorrowerRequest.prototype, "retailCustomerId", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_transformer_1.Expose)(),
|
|
33
|
-
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
(0, class_validator_1.IsString)(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], UpsertLoanBorrowerRequest.prototype, "fiadoDirectoryId", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_transformer_1.Expose)(),
|
|
39
|
-
(0, class_validator_1.IsOptional)(),
|
|
40
|
-
(0, class_validator_1.IsInt)(),
|
|
41
|
-
(0, class_validator_1.Min)(0),
|
|
42
|
-
(0, class_validator_1.Max)(100),
|
|
43
|
-
__metadata("design:type", Number)
|
|
44
|
-
], UpsertLoanBorrowerRequest.prototype, "sciScore", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, class_transformer_1.Expose)(),
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
(0, class_validator_1.IsEnum)(ClientLevelEnum_1.ClientLevelEnum),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], UpsertLoanBorrowerRequest.prototype, "clientLevel", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, class_transformer_1.Expose)(),
|
|
53
|
-
(0, class_validator_1.IsOptional)(),
|
|
54
|
-
(0, class_validator_1.IsInt)(),
|
|
55
|
-
__metadata("design:type", Number)
|
|
56
|
-
], UpsertLoanBorrowerRequest.prototype, "bureauScore", void 0);
|
|
57
37
|
__decorate([
|
|
58
38
|
(0, class_transformer_1.Expose)(),
|
|
59
39
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -6,7 +6,7 @@ import { ClientLevelEnum } from '../../../loanScoring/enums/ClientLevelEnum';
|
|
|
6
6
|
export interface LoanBorrowerResponse {
|
|
7
7
|
borrowerId: string;
|
|
8
8
|
retailCustomerId: string;
|
|
9
|
-
|
|
9
|
+
directoryId: string;
|
|
10
10
|
sciScore?: number;
|
|
11
11
|
clientLevel?: ClientLevelEnum;
|
|
12
12
|
bureauScore?: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body del PUT /me/profile/complete (autenticado, gate post-MFA del autoregistro). DEC-RBAC-034.
|
|
3
|
+
* Opera sobre el propio usuario (cognitoSub del token). Valida nombre + los `userFieldDefs` requeridos
|
|
4
|
+
* del tenant (422 MISSING_REQUIRED_FIELDS si faltan) y flipea `profileComplete=true`.
|
|
5
|
+
*/
|
|
6
|
+
export declare class CompleteMyProfileRequest {
|
|
7
|
+
displayName: string;
|
|
8
|
+
customFields?: Record<string, string>;
|
|
9
|
+
}
|
|
@@ -9,28 +9,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.CompleteMyProfileRequest = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
/**
|
|
16
|
-
* Body del
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* El email se normaliza lowercase server-side. Postura anti-enumeración: respuesta 200 genérica
|
|
20
|
-
* siempre, sin filtrar existencia (ver AuthLoginManager.resendChallengeOtp).
|
|
16
|
+
* Body del PUT /me/profile/complete (autenticado, gate post-MFA del autoregistro). DEC-RBAC-034.
|
|
17
|
+
* Opera sobre el propio usuario (cognitoSub del token). Valida nombre + los `userFieldDefs` requeridos
|
|
18
|
+
* del tenant (422 MISSING_REQUIRED_FIELDS si faltan) y flipea `profileComplete=true`.
|
|
21
19
|
*/
|
|
22
|
-
class
|
|
20
|
+
class CompleteMyProfileRequest {
|
|
23
21
|
}
|
|
24
|
-
exports.
|
|
22
|
+
exports.CompleteMyProfileRequest = CompleteMyProfileRequest;
|
|
25
23
|
__decorate([
|
|
26
24
|
(0, class_transformer_1.Expose)(),
|
|
27
|
-
(0, class_validator_1.
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
28
26
|
(0, class_validator_1.IsNotEmpty)(),
|
|
29
27
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
28
|
+
], CompleteMyProfileRequest.prototype, "displayName", void 0);
|
|
31
29
|
__decorate([
|
|
32
30
|
(0, class_transformer_1.Expose)(),
|
|
33
|
-
(0, class_validator_1.
|
|
34
|
-
(0, class_validator_1.
|
|
35
|
-
__metadata("design:type",
|
|
36
|
-
],
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsObject)(),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], CompleteMyProfileRequest.prototype, "customFields", void 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body para cancelar una referencia de funding ya creada. La referencia/fundingId
|
|
3
|
+
* viaja en la URL (`/funding/{moduleName}/{fundingId}/cancel`); este body aporta
|
|
4
|
+
* el contexto del solicitante + idempotencia.
|
|
5
|
+
*
|
|
6
|
+
* NOTA: shape inferido desde el uso en `@fiado/api-invoker`
|
|
7
|
+
* (benefits-marketplace / equality-connector) — confirmar con el dueño del
|
|
8
|
+
* módulo walletFunding / el lambda equality-connector que implementa el cancel.
|
|
9
|
+
*/
|
|
10
|
+
export declare class CancelFundingReferenceRequest {
|
|
11
|
+
directoryId: string;
|
|
12
|
+
reason?: string;
|
|
13
|
+
idempotencyKey: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CancelFundingReferenceRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/**
|
|
15
|
+
* Body para cancelar una referencia de funding ya creada. La referencia/fundingId
|
|
16
|
+
* viaja en la URL (`/funding/{moduleName}/{fundingId}/cancel`); este body aporta
|
|
17
|
+
* el contexto del solicitante + idempotencia.
|
|
18
|
+
*
|
|
19
|
+
* NOTA: shape inferido desde el uso en `@fiado/api-invoker`
|
|
20
|
+
* (benefits-marketplace / equality-connector) — confirmar con el dueño del
|
|
21
|
+
* módulo walletFunding / el lambda equality-connector que implementa el cancel.
|
|
22
|
+
*/
|
|
23
|
+
class CancelFundingReferenceRequest {
|
|
24
|
+
}
|
|
25
|
+
exports.CancelFundingReferenceRequest = CancelFundingReferenceRequest;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.MaxLength)(64),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], CancelFundingReferenceRequest.prototype, "directoryId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.MaxLength)(256),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], CancelFundingReferenceRequest.prototype, "reason", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.MaxLength)(64),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CancelFundingReferenceRequest.prototype, "idempotencyKey", void 0);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
|
|
2
|
+
import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
|
|
3
|
+
/**
|
|
4
|
+
* Respuesta de la cancelación de una referencia de funding. Mismo estilo que
|
|
5
|
+
* CreateFundingReferenceResponse.
|
|
6
|
+
*
|
|
7
|
+
* NOTA: shape inferido desde el uso en `@fiado/api-invoker` — confirmar con el
|
|
8
|
+
* dueño del módulo walletFunding / el lambda equality-connector.
|
|
9
|
+
*/
|
|
10
|
+
export declare class CancelFundingReferenceResponse {
|
|
11
|
+
/** Referencia cancelada (misma PK que se creó). */
|
|
12
|
+
reference: string;
|
|
13
|
+
status: BenefitPaymentStatusEnum;
|
|
14
|
+
errorCode?: WalletFundingErrorCodeEnum;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CancelFundingReferenceResponse = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Respuesta de la cancelación de una referencia de funding. Mismo estilo que
|
|
6
|
+
* CreateFundingReferenceResponse.
|
|
7
|
+
*
|
|
8
|
+
* NOTA: shape inferido desde el uso en `@fiado/api-invoker` — confirmar con el
|
|
9
|
+
* dueño del módulo walletFunding / el lambda equality-connector.
|
|
10
|
+
*/
|
|
11
|
+
class CancelFundingReferenceResponse {
|
|
12
|
+
}
|
|
13
|
+
exports.CancelFundingReferenceResponse = CancelFundingReferenceResponse;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CancelWalletFundingRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class CancelWalletFundingRequest {
|
|
15
|
+
}
|
|
16
|
+
exports.CancelWalletFundingRequest = CancelWalletFundingRequest;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.MaxLength)(64),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], CancelWalletFundingRequest.prototype, "idempotencyKey", void 0);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
|
|
2
|
+
import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
|
|
3
|
+
export declare class CancelWalletFundingResponse {
|
|
4
|
+
status: BenefitPaymentStatusEnum;
|
|
5
|
+
errorCode?: WalletFundingErrorCodeEnum;
|
|
6
|
+
fundingId?: string;
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IsNumber } from "class-validator";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Respuesta estándar del endpoint privado `privateDeleteByDirectoryId`
|
|
5
|
+
* (DELETE /private/directory/{directoryId}) que cada lambda de dominio expone
|
|
6
|
+
* para el borrado en cascada de todo su rastro asociado a un directoryId.
|
|
7
|
+
*
|
|
8
|
+
* Idempotente: si no hay registros para ese directoryId, deletedCount = 0.
|
|
9
|
+
*/
|
|
10
|
+
export class DeleteByDirectoryResponse {
|
|
11
|
+
|
|
12
|
+
@IsNumber()
|
|
13
|
+
deletedCount: number;
|
|
14
|
+
}
|
package/src/directory/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './dtos/DirectoryBackofficeResponse';
|
|
|
7
7
|
export * from './dtos/DirectoryBackofficeUpdateRequest';
|
|
8
8
|
export * from './dtos/CreateDirectoryUserEventRequest';
|
|
9
9
|
export * from './dtos/CreateDirectoryUserEventResponse';
|
|
10
|
+
export * from './dtos/DeleteByDirectoryResponse';
|
|
10
11
|
|
|
11
12
|
export * from './dtos/External';
|
|
12
13
|
|
|
@@ -28,11 +28,13 @@ export class LoanBorrower {
|
|
|
28
28
|
@IsString()
|
|
29
29
|
retailCustomerId!: string;
|
|
30
30
|
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* ANCLA canónica del acreditado: el directoryId de Fiado (identidad universal — L-hydrate,
|
|
33
|
+
* decisión 2026-07-22). `retailCustomerId` queda solo como referencia del tenant.
|
|
34
|
+
*/
|
|
32
35
|
@Expose()
|
|
33
|
-
@IsOptional()
|
|
34
36
|
@IsString()
|
|
35
|
-
|
|
37
|
+
directoryId!: string;
|
|
36
38
|
|
|
37
39
|
/** SCI vigente 0-100 (M7). Ausente hasta la primera evaluación. */
|
|
38
40
|
@Expose()
|
|
@@ -24,8 +24,8 @@ export class SignLoanCreditRequest {
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* SOLO en el inicio de firma (tiempo 1) con el OTP REAL de messages-business: el directoryId
|
|
27
|
-
* Fiado del cliente (lo aporta el WIZARD — dueño del dato; fallback: el
|
|
28
|
-
*
|
|
27
|
+
* Fiado del cliente (lo aporta el WIZARD — dueño del dato; fallback: el directoryId
|
|
28
|
+
* (ancla) del borrower). El OTP se genera/verifica keyeado a este id (D5).
|
|
29
29
|
*/
|
|
30
30
|
@Expose()
|
|
31
31
|
@IsOptional()
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { Expose, Type } from 'class-transformer';
|
|
2
|
-
import {
|
|
3
|
-
IsEnum,
|
|
4
|
-
IsInt,
|
|
5
|
-
IsNotEmpty,
|
|
6
|
-
IsOptional,
|
|
7
|
-
IsString,
|
|
8
|
-
Max,
|
|
9
|
-
Min,
|
|
10
|
-
ValidateNested,
|
|
11
|
-
} from 'class-validator';
|
|
12
|
-
import { ClientLevelEnum } from '../../../loanScoring/enums/ClientLevelEnum';
|
|
2
|
+
import { IsNotEmpty, IsOptional, IsString, ValidateNested } from 'class-validator';
|
|
13
3
|
import { LoanBeneficiary } from '../LoanBeneficiary';
|
|
14
4
|
|
|
15
5
|
/**
|
|
16
|
-
* Body de POST /
|
|
17
|
-
*
|
|
18
|
-
*
|
|
6
|
+
* Body de `POST /private/borrowers` (loan-credit-business) — ALTA ON-DEMAND del acreditado
|
|
7
|
+
* (paso 04 del wizard, al elegir SureKeep como forma de pago — decisión 2026-07-22, L-hydrate).
|
|
8
|
+
*
|
|
9
|
+
* El wizard solo IDENTIFICA al cliente: el motor hace un pull síncrono a `retail-customer`
|
|
10
|
+
* (`GET /private/customers/:id`), valida `kycStatus=VERIFIED` + identidad Fiado presente, y
|
|
11
|
+
* persiste el acreditado con ancla `directoryId`. La PII del pull es TRANSITORIA (no se guarda).
|
|
12
|
+
*
|
|
13
|
+
* Idempotente: si el acreditado ya existe, se devuelve/completa (una persona = una ficha).
|
|
14
|
+
* Errores: `KYC_NOT_VERIFIED` · `IDENTITY_MISSING` · `BORROWER_SOURCE_NOT_FOUND` ·
|
|
15
|
+
* `RETAIL_PULL_FAILED` (422/502 — ver openapi del motor).
|
|
19
16
|
*/
|
|
20
17
|
export class UpsertLoanBorrowerRequest {
|
|
21
18
|
@Expose()
|
|
@@ -23,29 +20,7 @@ export class UpsertLoanBorrowerRequest {
|
|
|
23
20
|
@IsNotEmpty()
|
|
24
21
|
retailCustomerId!: string;
|
|
25
22
|
|
|
26
|
-
/**
|
|
27
|
-
@Expose()
|
|
28
|
-
@IsOptional()
|
|
29
|
-
@IsString()
|
|
30
|
-
fiadoDirectoryId?: string;
|
|
31
|
-
|
|
32
|
-
@Expose()
|
|
33
|
-
@IsOptional()
|
|
34
|
-
@IsInt()
|
|
35
|
-
@Min(0)
|
|
36
|
-
@Max(100)
|
|
37
|
-
sciScore?: number;
|
|
38
|
-
|
|
39
|
-
@Expose()
|
|
40
|
-
@IsOptional()
|
|
41
|
-
@IsEnum(ClientLevelEnum)
|
|
42
|
-
clientLevel?: ClientLevelEnum;
|
|
43
|
-
|
|
44
|
-
@Expose()
|
|
45
|
-
@IsOptional()
|
|
46
|
-
@IsInt()
|
|
47
|
-
bureauScore?: number;
|
|
48
|
-
|
|
23
|
+
/** Beneficiario / a quién avisar (opcional — el wizard lo captura en su paso propio). */
|
|
49
24
|
@Expose()
|
|
50
25
|
@IsOptional()
|
|
51
26
|
@ValidateNested()
|
|
@@ -7,7 +7,7 @@ import { ClientLevelEnum } from '../../../loanScoring/enums/ClientLevelEnum';
|
|
|
7
7
|
export interface LoanBorrowerResponse {
|
|
8
8
|
borrowerId: string;
|
|
9
9
|
retailCustomerId: string;
|
|
10
|
-
|
|
10
|
+
directoryId: string;
|
|
11
11
|
sciScore?: number;
|
|
12
12
|
clientLevel?: ClientLevelEnum;
|
|
13
13
|
bureauScore?: number;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rol RBAC mínimo que puede modificar un parámetro (RBAC a nivel de parámetro, modelo-datos §8).
|
|
3
|
-
* `retailer_admin` = "Admin VentasLuga" de M6 §8. Valores = identificadores de rol de RBAC F0.
|
|
4
|
-
* TD-004: confirmar mapeo super_admin ↔ platform_super_admin con el naming real de F0.
|
|
5
|
-
* @enum {string}
|
|
6
|
-
*/
|
|
7
|
-
export declare enum ModifiableByRoleEnum {
|
|
8
|
-
SUPER_ADMIN = "super_admin",
|
|
9
|
-
SOFOM_ADMIN = "sofom_admin",
|
|
10
|
-
RETAILER_ADMIN = "retailer_admin"
|
|
11
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModifiableByRoleEnum = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Rol RBAC mínimo que puede modificar un parámetro (RBAC a nivel de parámetro, modelo-datos §8).
|
|
6
|
-
* `retailer_admin` = "Admin VentasLuga" de M6 §8. Valores = identificadores de rol de RBAC F0.
|
|
7
|
-
* TD-004: confirmar mapeo super_admin ↔ platform_super_admin con el naming real de F0.
|
|
8
|
-
* @enum {string}
|
|
9
|
-
*/
|
|
10
|
-
var ModifiableByRoleEnum;
|
|
11
|
-
(function (ModifiableByRoleEnum) {
|
|
12
|
-
ModifiableByRoleEnum["SUPER_ADMIN"] = "super_admin";
|
|
13
|
-
ModifiableByRoleEnum["SOFOM_ADMIN"] = "sofom_admin";
|
|
14
|
-
ModifiableByRoleEnum["RETAILER_ADMIN"] = "retailer_admin";
|
|
15
|
-
})(ModifiableByRoleEnum || (exports.ModifiableByRoleEnum = ModifiableByRoleEnum = {}));
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { MfaMethodEnum } from '../enums/MfaMethodEnum';
|
|
2
|
-
/**
|
|
3
|
-
* Body del POST /auth/resend-otp (público, anónimo). DEC-RBAC-054.
|
|
4
|
-
* Reenvía el OTP del login re-disparando el challenge real CUSTOM_AUTH (EMAIL_OTP) para la
|
|
5
|
-
* identidad SIN password. `tenantId` obligatorio (DEC-064 — el picker ya lo resolvió, NO "solo email").
|
|
6
|
-
* El email se normaliza lowercase server-side. Postura anti-enumeración: respuesta 200 genérica
|
|
7
|
-
* siempre, sin filtrar existencia (ver AuthLoginManager.resendChallengeOtp).
|
|
8
|
-
*/
|
|
9
|
-
export declare class ResendOtpRequest {
|
|
10
|
-
email: string;
|
|
11
|
-
tenantId: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Respuesta del resend-otp. `session`/`mfaMethod` frescos del nuevo challenge CUSTOM_AUTH.
|
|
15
|
-
* Plain sin validators (no validamos lo que mandamos al cliente — fiado-validation-and-dtos § 7).
|
|
16
|
-
* Ambos opcionales: en los caminos de rechazo silencioso (anti-enumeración) o ramas sin CUSTOM_AUTH
|
|
17
|
-
* el server responde 200 genérico sin session ni método.
|
|
18
|
-
*/
|
|
19
|
-
export interface ResendOtpResponse {
|
|
20
|
-
session?: string;
|
|
21
|
-
mfaMethod?: MfaMethodEnum;
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Body del POST /self-register/resend-otp (público, anónimo). DEC-RBAC-054.
|
|
3
|
-
* Re-envía el OTP del autoregistro (mecanismo messages-business, NO Cognito) tras validar un
|
|
4
|
-
* `pending` existente. Misma postura anti-enumeración del start. El email se normaliza lowercase
|
|
5
|
-
* server-side. DTO propio por endpoint (NO reusa SelfRegisterStartRequest, que exige roleId/scope/
|
|
6
|
-
* scopeRef, ni SelfRegisterVerifyOtpRequest, que exige otp).
|
|
7
|
-
*/
|
|
8
|
-
export declare class ResendSelfRegisterOtpRequest {
|
|
9
|
-
tenantId: string;
|
|
10
|
-
email: string;
|
|
11
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ResendSelfRegisterOtpRequest = void 0;
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
/**
|
|
16
|
-
* Body del POST /self-register/resend-otp (público, anónimo). DEC-RBAC-054.
|
|
17
|
-
* Re-envía el OTP del autoregistro (mecanismo messages-business, NO Cognito) tras validar un
|
|
18
|
-
* `pending` existente. Misma postura anti-enumeración del start. El email se normaliza lowercase
|
|
19
|
-
* server-side. DTO propio por endpoint (NO reusa SelfRegisterStartRequest, que exige roleId/scope/
|
|
20
|
-
* scopeRef, ni SelfRegisterVerifyOtpRequest, que exige otp).
|
|
21
|
-
*/
|
|
22
|
-
class ResendSelfRegisterOtpRequest {
|
|
23
|
-
}
|
|
24
|
-
exports.ResendSelfRegisterOtpRequest = ResendSelfRegisterOtpRequest;
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, class_transformer_1.Expose)(),
|
|
27
|
-
(0, class_validator_1.IsString)(),
|
|
28
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], ResendSelfRegisterOtpRequest.prototype, "tenantId", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_transformer_1.Expose)(),
|
|
33
|
-
(0, class_validator_1.IsEmail)(),
|
|
34
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], ResendSelfRegisterOtpRequest.prototype, "email", void 0);
|