@fiado/type-kit 3.206.0 → 3.208.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/_test_/unit/creditBackoffice/AddWhitelistRequest.test.ts +55 -0
- package/bin/creditBackoffice/dtos/AddWhitelistRequest.d.ts +13 -0
- package/bin/{platformRbac/dtos/ResendOtpRequest.js → creditBackoffice/dtos/AddWhitelistRequest.js} +18 -14
- package/bin/creditBackoffice/dtos/SearchClientsForWhitelistItem.d.ts +9 -0
- package/bin/creditBackoffice/dtos/SearchClientsForWhitelistItem.js +2 -0
- package/bin/creditBackoffice/dtos/WhitelistItem.d.ts +14 -0
- package/bin/creditBackoffice/dtos/WhitelistItem.js +2 -0
- package/bin/creditBackoffice/index.d.ts +3 -0
- package/bin/creditBackoffice/index.js +3 -0
- package/bin/loanCredit/dtos/LoanContract.d.ts +3 -1
- package/bin/loanCredit/dtos/LoanContract.js +6 -0
- package/bin/loanCredit/dtos/requests/SignLoanCreditRequest.d.ts +7 -0
- package/bin/loanCredit/dtos/requests/SignLoanCreditRequest.js +6 -0
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.d.ts +11 -0
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.js +46 -0
- package/bin/loanCredit/dtos/responses/LoanContractResponse.d.ts +1 -0
- package/bin/loanCredit/enums/ClientLevelEnum.d.ts +11 -0
- package/bin/loanCredit/enums/ClientLevelEnum.js +15 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +6 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +31 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +7 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +6 -0
- package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +11 -0
- package/bin/{platformRbac/dtos/ResendSelfRegisterOtpRequest.js → walletFunding/dtos/CancelFundingRequest.js} +13 -16
- package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +14 -0
- package/bin/walletFunding/dtos/CancelFundingResponse.js +12 -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/creditBackoffice/dtos/AddWhitelistRequest.ts +24 -0
- package/src/creditBackoffice/dtos/SearchClientsForWhitelistItem.ts +9 -0
- package/src/creditBackoffice/dtos/WhitelistItem.ts +15 -0
- package/src/creditBackoffice/index.ts +3 -0
- package/src/loanCredit/dtos/LoanContract.ts +7 -1
- package/src/loanCredit/dtos/requests/SignLoanCreditRequest.ts +12 -1
- package/src/loanCredit/dtos/responses/LoanContractResponse.ts +1 -0
- package/bin/loanConfig/enums/ModifiableByRoleEnum.d.ts +0 -11
- package/bin/loanConfig/enums/ModifiableByRoleEnum.js +0 -15
- package/bin/places/dtos/CashInFeeDto.d.ts +0 -17
- package/bin/places/dtos/CashInFeeDto.js +0 -12
- package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +0 -22
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +0 -11
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { plainToInstance } from 'class-transformer';
|
|
3
|
+
import { validate } from 'class-validator';
|
|
4
|
+
import { AddWhitelistRequest } from '../../../src/creditBackoffice/dtos/AddWhitelistRequest';
|
|
5
|
+
import { CreditLevelEnum } from '../../../src/creditEngine/enums/CreditLevelEnum';
|
|
6
|
+
|
|
7
|
+
describe('AddWhitelistRequest', () => {
|
|
8
|
+
it('acepta payload válido sin creditLevel (default GOLD lo pone el backend)', async () => {
|
|
9
|
+
const req = plainToInstance(AddWhitelistRequest, {
|
|
10
|
+
directoryId: 'DIR-123',
|
|
11
|
+
displayName: 'Jaime Robles',
|
|
12
|
+
});
|
|
13
|
+
const errors = await validate(req as object);
|
|
14
|
+
expect(errors).toHaveLength(0);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('acepta payload válido con creditLevel explicito', async () => {
|
|
18
|
+
const req = plainToInstance(AddWhitelistRequest, {
|
|
19
|
+
directoryId: 'DIR-123',
|
|
20
|
+
displayName: 'Jaime Robles',
|
|
21
|
+
creditLevel: CreditLevelEnum.PLATINUM,
|
|
22
|
+
});
|
|
23
|
+
const errors = await validate(req as object);
|
|
24
|
+
expect(errors).toHaveLength(0);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('rechaza directoryId vacío', async () => {
|
|
28
|
+
const req = plainToInstance(AddWhitelistRequest, {
|
|
29
|
+
directoryId: '',
|
|
30
|
+
displayName: 'x',
|
|
31
|
+
});
|
|
32
|
+
const errors = await validate(req as object);
|
|
33
|
+
expect(errors.length).toBeGreaterThan(0);
|
|
34
|
+
expect(errors.find(e => e.property === 'directoryId')).toBeDefined();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('rechaza displayName vacío', async () => {
|
|
38
|
+
const req = plainToInstance(AddWhitelistRequest, {
|
|
39
|
+
directoryId: 'DIR-1',
|
|
40
|
+
displayName: '',
|
|
41
|
+
});
|
|
42
|
+
const errors = await validate(req as object);
|
|
43
|
+
expect(errors.find(e => e.property === 'displayName')).toBeDefined();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('rechaza creditLevel invalido', async () => {
|
|
47
|
+
const req = plainToInstance(AddWhitelistRequest, {
|
|
48
|
+
directoryId: 'DIR-1',
|
|
49
|
+
displayName: 'x',
|
|
50
|
+
creditLevel: 'DIAMOND',
|
|
51
|
+
});
|
|
52
|
+
const errors = await validate(req as object);
|
|
53
|
+
expect(errors.find(e => e.property === 'creditLevel')).toBeDefined();
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CreditLevelEnum } from "../../creditEngine/enums/CreditLevelEnum";
|
|
2
|
+
/**
|
|
3
|
+
* Body para POST /backoffice/whitelist.
|
|
4
|
+
* Agrega o reactiva un cliente en la whitelist para pruebas productivas.
|
|
5
|
+
*
|
|
6
|
+
* `creditLevel` es opcional. Si no se envia, el backend usa GOLD por default
|
|
7
|
+
* (retro-compat con el diseño original "whitelist Oro").
|
|
8
|
+
*/
|
|
9
|
+
export declare class AddWhitelistRequest {
|
|
10
|
+
directoryId: string;
|
|
11
|
+
displayName: string;
|
|
12
|
+
creditLevel?: CreditLevelEnum;
|
|
13
|
+
}
|
package/bin/{platformRbac/dtos/ResendOtpRequest.js → creditBackoffice/dtos/AddWhitelistRequest.js}
RENAMED
|
@@ -9,28 +9,32 @@ 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.
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
12
|
+
exports.AddWhitelistRequest = void 0;
|
|
14
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const CreditLevelEnum_1 = require("../../creditEngine/enums/CreditLevelEnum");
|
|
15
15
|
/**
|
|
16
|
-
* Body
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
16
|
+
* Body para POST /backoffice/whitelist.
|
|
17
|
+
* Agrega o reactiva un cliente en la whitelist para pruebas productivas.
|
|
18
|
+
*
|
|
19
|
+
* `creditLevel` es opcional. Si no se envia, el backend usa GOLD por default
|
|
20
|
+
* (retro-compat con el diseño original "whitelist Oro").
|
|
21
21
|
*/
|
|
22
|
-
class
|
|
22
|
+
class AddWhitelistRequest {
|
|
23
23
|
}
|
|
24
|
-
exports.
|
|
24
|
+
exports.AddWhitelistRequest = AddWhitelistRequest;
|
|
25
25
|
__decorate([
|
|
26
|
-
(0,
|
|
27
|
-
(0, class_validator_1.IsEmail)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
28
27
|
(0, class_validator_1.IsNotEmpty)(),
|
|
29
28
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
29
|
+
], AddWhitelistRequest.prototype, "directoryId", void 0);
|
|
31
30
|
__decorate([
|
|
32
|
-
(0, class_transformer_1.Expose)(),
|
|
33
31
|
(0, class_validator_1.IsString)(),
|
|
34
32
|
(0, class_validator_1.IsNotEmpty)(),
|
|
33
|
+
(0, class_validator_1.MaxLength)(200),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], AddWhitelistRequest.prototype, "displayName", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.IsEnum)(CreditLevelEnum_1.CreditLevelEnum),
|
|
35
39
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
40
|
+
], AddWhitelistRequest.prototype, "creditLevel", void 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CreditLevelEnum } from "../../creditEngine/enums/CreditLevelEnum";
|
|
2
|
+
/**
|
|
3
|
+
* Response item de GET /backoffice/whitelist y POST /backoffice/whitelist.
|
|
4
|
+
*/
|
|
5
|
+
export interface WhitelistItem {
|
|
6
|
+
directoryId: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
creditLevel: CreditLevelEnum;
|
|
9
|
+
addedAt: string;
|
|
10
|
+
addedBy: string;
|
|
11
|
+
isActive: 'YES' | 'NO';
|
|
12
|
+
removedAt?: string;
|
|
13
|
+
removedBy?: string;
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './enums/ConfigType';
|
|
2
|
+
export * from './dtos/AddWhitelistRequest';
|
|
2
3
|
export * from './dtos/BackofficeApplicationDetail';
|
|
3
4
|
export * from './dtos/BackofficeApplicationsListItem';
|
|
4
5
|
export * from './dtos/BackofficeCreditDetail';
|
|
@@ -14,8 +15,10 @@ export * from './dtos/BackofficeProfilesListItem';
|
|
|
14
15
|
export * from './dtos/BackofficeProfilesListResponse';
|
|
15
16
|
export * from './dtos/BackofficeProfilesSummary';
|
|
16
17
|
export * from './dtos/ConfigSnapshotListItem';
|
|
18
|
+
export * from './dtos/SearchClientsForWhitelistItem';
|
|
17
19
|
export * from './dtos/SimulateImpactRequest';
|
|
18
20
|
export * from './dtos/SimulateImpactResult';
|
|
19
21
|
export * from './dtos/SimulateInterestRequest';
|
|
20
22
|
export * from './dtos/SimulateInterestResult';
|
|
21
23
|
export * from './dtos/UpdateConfigRequest';
|
|
24
|
+
export * from './dtos/WhitelistItem';
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
// Enums
|
|
18
18
|
__exportStar(require("./enums/ConfigType"), exports);
|
|
19
19
|
// DTOs
|
|
20
|
+
__exportStar(require("./dtos/AddWhitelistRequest"), exports);
|
|
20
21
|
__exportStar(require("./dtos/BackofficeApplicationDetail"), exports);
|
|
21
22
|
__exportStar(require("./dtos/BackofficeApplicationsListItem"), exports);
|
|
22
23
|
__exportStar(require("./dtos/BackofficeCreditDetail"), exports);
|
|
@@ -32,8 +33,10 @@ __exportStar(require("./dtos/BackofficeProfilesListItem"), exports);
|
|
|
32
33
|
__exportStar(require("./dtos/BackofficeProfilesListResponse"), exports);
|
|
33
34
|
__exportStar(require("./dtos/BackofficeProfilesSummary"), exports);
|
|
34
35
|
__exportStar(require("./dtos/ConfigSnapshotListItem"), exports);
|
|
36
|
+
__exportStar(require("./dtos/SearchClientsForWhitelistItem"), exports);
|
|
35
37
|
__exportStar(require("./dtos/SimulateImpactRequest"), exports);
|
|
36
38
|
__exportStar(require("./dtos/SimulateImpactResult"), exports);
|
|
37
39
|
__exportStar(require("./dtos/SimulateInterestRequest"), exports);
|
|
38
40
|
__exportStar(require("./dtos/SimulateInterestResult"), exports);
|
|
39
41
|
__exportStar(require("./dtos/UpdateConfigRequest"), exports);
|
|
42
|
+
__exportStar(require("./dtos/WhitelistItem"), exports);
|
|
@@ -11,7 +11,9 @@ export declare class LoanContract {
|
|
|
11
11
|
contractId: string;
|
|
12
12
|
creditId: string;
|
|
13
13
|
type: ContractTypeEnum;
|
|
14
|
-
/**
|
|
14
|
+
/** Id del documento en document-generator (para getDocumentUrl). Ausente hasta generar. */
|
|
15
|
+
documentId?: string;
|
|
16
|
+
/** Key del PDF en el storage de document-generator. Ausente hasta generar. */
|
|
15
17
|
pdfS3Key?: string;
|
|
16
18
|
/** Hash SHA-256 del PDF firmado (trazabilidad FES — M2 §4.4). Ausente hasta generar. */
|
|
17
19
|
sha256?: string;
|
|
@@ -40,6 +40,12 @@ __decorate([
|
|
|
40
40
|
(0, class_validator_1.IsEnum)(ContractTypeEnum_1.ContractTypeEnum),
|
|
41
41
|
__metadata("design:type", String)
|
|
42
42
|
], LoanContract.prototype, "type", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_transformer_1.Expose)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], LoanContract.prototype, "documentId", void 0);
|
|
43
49
|
__decorate([
|
|
44
50
|
(0, class_transformer_1.Expose)(),
|
|
45
51
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -20,6 +20,13 @@ export declare class SignLoanCreditRequest {
|
|
|
20
20
|
* hidratado en el borrower). El OTP se genera/verifica keyeado a este id (D5).
|
|
21
21
|
*/
|
|
22
22
|
otpDirectoryId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* SOLO en el inicio de firma (tiempo 1): variables del TEMPLATE del contrato que el motor no
|
|
25
|
+
* posee (PII TRANSITORIA del cliente — nombreAcreditado, curp, domicilio, lugar de firma...).
|
|
26
|
+
* Las aporta el WIZARD (dueño del dato); el motor las mezcla con las financieras (monto,
|
|
27
|
+
* pagos, tasa) y las pasa a document-generator. NO se persisten ni loggean (silo PII-zero).
|
|
28
|
+
*/
|
|
29
|
+
contractData?: Record<string, string>;
|
|
23
30
|
/**
|
|
24
31
|
* SOLO en el inicio de firma (tiempo 1) con el OTP REAL: el teléfono destino del SMS (E.164).
|
|
25
32
|
* PII TRANSITORIA: el motor la pasa a messages-business y NO la persiste ni loggea (silo
|
|
@@ -41,6 +41,12 @@ __decorate([
|
|
|
41
41
|
(0, class_validator_1.IsString)(),
|
|
42
42
|
__metadata("design:type", String)
|
|
43
43
|
], SignLoanCreditRequest.prototype, "otpDirectoryId", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_transformer_1.Expose)(),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_validator_1.IsObject)(),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], SignLoanCreditRequest.prototype, "contractData", void 0);
|
|
44
50
|
__decorate([
|
|
45
51
|
(0, class_transformer_1.Expose)(),
|
|
46
52
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body de PUT /credits/:creditId/checklist (loan-credit-business). Marca condiciones de activación
|
|
3
|
+
* cumplidas. Solo se mandan las que cambian; en F3 las marcarán los flujos de firma de contrato
|
|
4
|
+
* (`downPayment` + `contractSigned`) y de enrolamiento MDM (`imeiEnrolled` + `lockVerified`).
|
|
5
|
+
*/
|
|
6
|
+
export declare class UpdateActivationChecklistRequest {
|
|
7
|
+
downPayment?: boolean;
|
|
8
|
+
contractSigned?: boolean;
|
|
9
|
+
imeiEnrolled?: boolean;
|
|
10
|
+
lockVerified?: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.UpdateActivationChecklistRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Body de PUT /credits/:creditId/checklist (loan-credit-business). Marca condiciones de activación
|
|
17
|
+
* cumplidas. Solo se mandan las que cambian; en F3 las marcarán los flujos de firma de contrato
|
|
18
|
+
* (`downPayment` + `contractSigned`) y de enrolamiento MDM (`imeiEnrolled` + `lockVerified`).
|
|
19
|
+
*/
|
|
20
|
+
class UpdateActivationChecklistRequest {
|
|
21
|
+
}
|
|
22
|
+
exports.UpdateActivationChecklistRequest = UpdateActivationChecklistRequest;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
(0, class_validator_1.IsBoolean)(),
|
|
27
|
+
__metadata("design:type", Boolean)
|
|
28
|
+
], UpdateActivationChecklistRequest.prototype, "downPayment", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsBoolean)(),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], UpdateActivationChecklistRequest.prototype, "contractSigned", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.IsBoolean)(),
|
|
39
|
+
__metadata("design:type", Boolean)
|
|
40
|
+
], UpdateActivationChecklistRequest.prototype, "imeiEnrolled", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsBoolean)(),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], UpdateActivationChecklistRequest.prototype, "lockVerified", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nivel del cliente según su SCI (M7/05_MOTOR §3.2): 21-60 Bronce · 61-80 Plata · 81-100 Oro.
|
|
3
|
+
* Distinto de `CreditPlanLevelEnum` de loanOfferings (que además tiene `ALL` para planes):
|
|
4
|
+
* un CLIENTE nunca es `ALL`.
|
|
5
|
+
* @enum {string}
|
|
6
|
+
*/
|
|
7
|
+
export declare enum ClientLevelEnum {
|
|
8
|
+
BRONZE = "BRONZE",
|
|
9
|
+
SILVER = "SILVER",
|
|
10
|
+
GOLD = "GOLD"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientLevelEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Nivel del cliente según su SCI (M7/05_MOTOR §3.2): 21-60 Bronce · 61-80 Plata · 81-100 Oro.
|
|
6
|
+
* Distinto de `CreditPlanLevelEnum` de loanOfferings (que además tiene `ALL` para planes):
|
|
7
|
+
* un CLIENTE nunca es `ALL`.
|
|
8
|
+
* @enum {string}
|
|
9
|
+
*/
|
|
10
|
+
var ClientLevelEnum;
|
|
11
|
+
(function (ClientLevelEnum) {
|
|
12
|
+
ClientLevelEnum["BRONZE"] = "BRONZE";
|
|
13
|
+
ClientLevelEnum["SILVER"] = "SILVER";
|
|
14
|
+
ClientLevelEnum["GOLD"] = "GOLD";
|
|
15
|
+
})(ClientLevelEnum || (exports.ClientLevelEnum = ClientLevelEnum = {}));
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
class CancelFundingReferenceRequest {
|
|
15
|
+
}
|
|
16
|
+
exports.CancelFundingReferenceRequest = CancelFundingReferenceRequest;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.MaxLength)(64),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], CancelFundingReferenceRequest.prototype, "reference", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.MaxLength)(64),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CancelFundingReferenceRequest.prototype, "directoryId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.MaxLength)(64),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], CancelFundingReferenceRequest.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 CancelFundingReferenceResponse {
|
|
4
|
+
reference: string;
|
|
5
|
+
status: BenefitPaymentStatusEnum;
|
|
6
|
+
errorCode?: WalletFundingErrorCodeEnum;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
3
|
+
* `reference` viaja en el path, `directoryId` se resuelve del JWT.
|
|
4
|
+
* `providerModuleName` permite al marketplace rutear al publisher correcto
|
|
5
|
+
* sin tener que persistir el mapping (el wallet-app sabe el moduleName
|
|
6
|
+
* porque vino en la respuesta del authorize).
|
|
7
|
+
*/
|
|
8
|
+
export declare class CancelFundingRequest {
|
|
9
|
+
idempotencyKey: string;
|
|
10
|
+
providerModuleName: string;
|
|
11
|
+
}
|
|
@@ -9,28 +9,25 @@ 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.
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
12
|
+
exports.CancelFundingRequest = void 0;
|
|
14
13
|
const class_validator_1 = require("class-validator");
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* `
|
|
19
|
-
*
|
|
20
|
-
*
|
|
15
|
+
* Request del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
16
|
+
* `reference` viaja en el path, `directoryId` se resuelve del JWT.
|
|
17
|
+
* `providerModuleName` permite al marketplace rutear al publisher correcto
|
|
18
|
+
* sin tener que persistir el mapping (el wallet-app sabe el moduleName
|
|
19
|
+
* porque vino en la respuesta del authorize).
|
|
21
20
|
*/
|
|
22
|
-
class
|
|
21
|
+
class CancelFundingRequest {
|
|
23
22
|
}
|
|
24
|
-
exports.
|
|
23
|
+
exports.CancelFundingRequest = CancelFundingRequest;
|
|
25
24
|
__decorate([
|
|
26
|
-
(0, class_transformer_1.Expose)(),
|
|
27
25
|
(0, class_validator_1.IsString)(),
|
|
28
|
-
(0, class_validator_1.
|
|
26
|
+
(0, class_validator_1.MaxLength)(64),
|
|
29
27
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
28
|
+
], CancelFundingRequest.prototype, "idempotencyKey", void 0);
|
|
31
29
|
__decorate([
|
|
32
|
-
(0,
|
|
33
|
-
(0, class_validator_1.
|
|
34
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.MaxLength)(128),
|
|
35
32
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
33
|
+
], CancelFundingRequest.prototype, "providerModuleName", void 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
|
|
2
|
+
import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
|
|
3
|
+
/**
|
|
4
|
+
* Response del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
5
|
+
* `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
|
|
6
|
+
* REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
|
|
7
|
+
* (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
|
|
8
|
+
*/
|
|
9
|
+
export declare class CancelFundingResponse {
|
|
10
|
+
reference: string;
|
|
11
|
+
status: BenefitPaymentStatusEnum;
|
|
12
|
+
errorCode?: WalletFundingErrorCodeEnum;
|
|
13
|
+
message?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CancelFundingResponse = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Response del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
6
|
+
* `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
|
|
7
|
+
* REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
|
|
8
|
+
* (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
|
|
9
|
+
*/
|
|
10
|
+
class CancelFundingResponse {
|
|
11
|
+
}
|
|
12
|
+
exports.CancelFundingResponse = CancelFundingResponse;
|
|
@@ -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
|
+
reference?: string;
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IsNotEmpty, IsString, IsEnum, IsOptional, MaxLength } from "class-validator";
|
|
2
|
+
import { CreditLevelEnum } from "../../creditEngine/enums/CreditLevelEnum";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Body para POST /backoffice/whitelist.
|
|
6
|
+
* Agrega o reactiva un cliente en la whitelist para pruebas productivas.
|
|
7
|
+
*
|
|
8
|
+
* `creditLevel` es opcional. Si no se envia, el backend usa GOLD por default
|
|
9
|
+
* (retro-compat con el diseño original "whitelist Oro").
|
|
10
|
+
*/
|
|
11
|
+
export class AddWhitelistRequest {
|
|
12
|
+
@IsString()
|
|
13
|
+
@IsNotEmpty()
|
|
14
|
+
directoryId!: string;
|
|
15
|
+
|
|
16
|
+
@IsString()
|
|
17
|
+
@IsNotEmpty()
|
|
18
|
+
@MaxLength(200)
|
|
19
|
+
displayName!: string;
|
|
20
|
+
|
|
21
|
+
@IsOptional()
|
|
22
|
+
@IsEnum(CreditLevelEnum)
|
|
23
|
+
creditLevel?: CreditLevelEnum;
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CreditLevelEnum } from "../../creditEngine/enums/CreditLevelEnum";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Response item de GET /backoffice/whitelist y POST /backoffice/whitelist.
|
|
5
|
+
*/
|
|
6
|
+
export interface WhitelistItem {
|
|
7
|
+
directoryId: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
creditLevel: CreditLevelEnum; // nivel forzado por la whitelist (default GOLD historico)
|
|
10
|
+
addedAt: string; // ISO 8601
|
|
11
|
+
addedBy: string; // email
|
|
12
|
+
isActive: 'YES' | 'NO';
|
|
13
|
+
removedAt?: string;
|
|
14
|
+
removedBy?: string;
|
|
15
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export * from './enums/ConfigType';
|
|
3
3
|
|
|
4
4
|
// DTOs
|
|
5
|
+
export * from './dtos/AddWhitelistRequest';
|
|
5
6
|
export * from './dtos/BackofficeApplicationDetail';
|
|
6
7
|
export * from './dtos/BackofficeApplicationsListItem';
|
|
7
8
|
export * from './dtos/BackofficeCreditDetail';
|
|
@@ -17,8 +18,10 @@ export * from './dtos/BackofficeProfilesListItem';
|
|
|
17
18
|
export * from './dtos/BackofficeProfilesListResponse';
|
|
18
19
|
export * from './dtos/BackofficeProfilesSummary';
|
|
19
20
|
export * from './dtos/ConfigSnapshotListItem';
|
|
21
|
+
export * from './dtos/SearchClientsForWhitelistItem';
|
|
20
22
|
export * from './dtos/SimulateImpactRequest';
|
|
21
23
|
export * from './dtos/SimulateImpactResult';
|
|
22
24
|
export * from './dtos/SimulateInterestRequest';
|
|
23
25
|
export * from './dtos/SimulateInterestResult';
|
|
24
26
|
export * from './dtos/UpdateConfigRequest';
|
|
27
|
+
export * from './dtos/WhitelistItem';
|
|
@@ -24,7 +24,13 @@ export class LoanContract {
|
|
|
24
24
|
@IsEnum(ContractTypeEnum)
|
|
25
25
|
type!: ContractTypeEnum;
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/** Id del documento en document-generator (para getDocumentUrl). Ausente hasta generar. */
|
|
28
|
+
@Expose()
|
|
29
|
+
@IsOptional()
|
|
30
|
+
@IsString()
|
|
31
|
+
documentId?: string;
|
|
32
|
+
|
|
33
|
+
/** Key del PDF en el storage de document-generator. Ausente hasta generar. */
|
|
28
34
|
@Expose()
|
|
29
35
|
@IsOptional()
|
|
30
36
|
@IsString()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Expose } from 'class-transformer';
|
|
2
|
-
import { IsOptional, IsString, Length } from 'class-validator';
|
|
2
|
+
import { IsObject, IsOptional, IsString, Length } from 'class-validator';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Body de `POST /private/credits/:creditId/sign` (loan-credit-business — wizard paso 08, firma FES
|
|
@@ -32,6 +32,17 @@ export class SignLoanCreditRequest {
|
|
|
32
32
|
@IsString()
|
|
33
33
|
otpDirectoryId?: string;
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* SOLO en el inicio de firma (tiempo 1): variables del TEMPLATE del contrato que el motor no
|
|
37
|
+
* posee (PII TRANSITORIA del cliente — nombreAcreditado, curp, domicilio, lugar de firma...).
|
|
38
|
+
* Las aporta el WIZARD (dueño del dato); el motor las mezcla con las financieras (monto,
|
|
39
|
+
* pagos, tasa) y las pasa a document-generator. NO se persisten ni loggean (silo PII-zero).
|
|
40
|
+
*/
|
|
41
|
+
@Expose()
|
|
42
|
+
@IsOptional()
|
|
43
|
+
@IsObject()
|
|
44
|
+
contractData?: Record<string, string>;
|
|
45
|
+
|
|
35
46
|
/**
|
|
36
47
|
* SOLO en el inicio de firma (tiempo 1) con el OTP REAL: el teléfono destino del SMS (E.164).
|
|
37
48
|
* PII TRANSITORIA: el motor la pasa a messages-business y NO la persiste ni loggea (silo
|
|
@@ -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,17 +0,0 @@
|
|
|
1
|
-
import { CurrencyId } from '../../currency/enums/CurrencyId';
|
|
2
|
-
/**
|
|
3
|
-
* Comisión que cobra un punto de cash-in (lo que el lambda MUESTRA, no cobra).
|
|
4
|
-
* - GreenDot (US): representativo por cadena → `fixed` + `cap` (cada tienda cobra hasta el tope).
|
|
5
|
-
* - Passport (MX): por red → `fixed` + `percentage`.
|
|
6
|
-
* Response DTO — sin decoradores de validación.
|
|
7
|
-
*/
|
|
8
|
-
export declare class CashInFeeDto {
|
|
9
|
-
/** Comisión fija, en la moneda del país. */
|
|
10
|
-
fixed?: number;
|
|
11
|
-
/** Porcentaje del monto depositado (0–100). */
|
|
12
|
-
percentage?: number;
|
|
13
|
-
/** Tope máximo de comisión (GreenDot: el asociado cobra hasta este cap). */
|
|
14
|
-
cap?: number;
|
|
15
|
-
/** Moneda del fee: USD (GreenDot) | MXN (Passport). */
|
|
16
|
-
currency: CurrencyId;
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CashInFeeDto = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Comisión que cobra un punto de cash-in (lo que el lambda MUESTRA, no cobra).
|
|
6
|
-
* - GreenDot (US): representativo por cadena → `fixed` + `cap` (cada tienda cobra hasta el tope).
|
|
7
|
-
* - Passport (MX): por red → `fixed` + `percentage`.
|
|
8
|
-
* Response DTO — sin decoradores de validación.
|
|
9
|
-
*/
|
|
10
|
-
class CashInFeeDto {
|
|
11
|
-
}
|
|
12
|
-
exports.CashInFeeDto = CashInFeeDto;
|
|
@@ -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
|
-
}
|