@fiado/type-kit 3.296.0 → 3.298.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/auth/SignUpProspectRequest.test.ts +8 -0
- package/bin/auth/dtos/SignUpProspectRequest.d.ts +3 -2
- package/bin/auth/dtos/SignUpProspectRequest.js +2 -1
- package/bin/index.d.ts +1 -0
- package/bin/index.js +4 -1
- package/bin/retailWizard/dtos/requests/ConsentsRequest.d.ts +1 -3
- package/bin/retailWizard/dtos/requests/ConsentsRequest.js +1 -7
- package/bin/userConfirmations/dtos/ConfirmationDismissRequest.d.ts +7 -0
- package/bin/userConfirmations/dtos/ConfirmationDismissRequest.js +26 -0
- package/bin/userConfirmations/dtos/ConfirmationDismissResponse.d.ts +8 -0
- package/bin/userConfirmations/dtos/ConfirmationDismissResponse.js +28 -0
- package/bin/userConfirmations/dtos/EmailConfirmationPayload.d.ts +8 -0
- package/bin/userConfirmations/dtos/EmailConfirmationPayload.js +28 -0
- package/bin/userConfirmations/dtos/PendingConfirmationItem.d.ts +13 -0
- package/bin/userConfirmations/dtos/PendingConfirmationItem.js +38 -0
- package/bin/userConfirmations/dtos/PendingConfirmationsResponse.d.ts +7 -0
- package/bin/userConfirmations/dtos/PendingConfirmationsResponse.js +23 -0
- package/bin/userConfirmations/enums/ConfirmationDisplayModeEnum.d.ts +9 -0
- package/bin/userConfirmations/enums/ConfirmationDisplayModeEnum.js +13 -0
- package/bin/userConfirmations/enums/ConfirmationTypeEnum.d.ts +6 -0
- package/bin/userConfirmations/enums/ConfirmationTypeEnum.js +10 -0
- package/bin/userConfirmations/index.d.ts +7 -0
- package/bin/userConfirmations/index.js +23 -0
- package/package.json +1 -1
- package/src/auth/dtos/SignUpProspectRequest.ts +5 -4
- package/src/index.ts +3 -0
- package/src/retailWizard/dtos/requests/ConsentsRequest.ts +2 -8
- package/src/userConfirmations/dtos/ConfirmationDismissRequest.ts +12 -0
- package/src/userConfirmations/dtos/ConfirmationDismissResponse.ts +13 -0
- package/src/userConfirmations/dtos/EmailConfirmationPayload.ts +13 -0
- package/src/userConfirmations/dtos/PendingConfirmationItem.ts +22 -0
- package/src/userConfirmations/dtos/PendingConfirmationsResponse.ts +10 -0
- package/src/userConfirmations/enums/ConfirmationDisplayModeEnum.ts +9 -0
- package/src/userConfirmations/enums/ConfirmationTypeEnum.ts +6 -0
- package/src/userConfirmations/index.ts +7 -0
|
@@ -12,6 +12,14 @@ describe('SignUpProspectRequest', () => {
|
|
|
12
12
|
expect(await validate(dto as object)).toHaveLength(0);
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
+
it('acepta un alta sin nombre — la persona queda sin preferredName', async () => {
|
|
16
|
+
const dto = plainToInstance(SignUpProspectRequest,
|
|
17
|
+
{ phoneNumber: '5512345678', tenantId: 'surekeep' },
|
|
18
|
+
{ excludeExtraneousValues: true });
|
|
19
|
+
|
|
20
|
+
expect(await validate(dto as object)).toHaveLength(0);
|
|
21
|
+
});
|
|
22
|
+
|
|
15
23
|
it('rechaza si falta el tenantId (el hardcode FIADO_BETA es justo lo que se elimina)', async () => {
|
|
16
24
|
const dto = plainToInstance(SignUpProspectRequest,
|
|
17
25
|
{ name: 'Paulina Garcia', phoneNumber: '5512345678' },
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* `tenantId` es OBLIGATORIO y explícito: la variante de agente lo tiene hardcodeado a
|
|
6
6
|
* `FIADO_BETA`, y eliminar ese hardcode es parte del contrato de este endpoint privado.
|
|
7
7
|
*
|
|
8
|
-
* ⚠️ PII:
|
|
8
|
+
* ⚠️ PII: teléfono — nunca loguear el request completo.
|
|
9
9
|
*/
|
|
10
10
|
export declare class SignUpProspectRequest {
|
|
11
|
-
|
|
11
|
+
/** Opcional: sin nombre la persona se crea sin `preferredName`; el real lo escribe el KYC después. */
|
|
12
|
+
name?: string;
|
|
12
13
|
phoneNumber: string;
|
|
13
14
|
/** Decidido: sin `@Matches(/^[a-z0-9-]+$/)` — `FIADO_BETA` es un tenant real y ese regex lo rechazaría. */
|
|
14
15
|
tenantId: string;
|
|
@@ -19,13 +19,14 @@ const class_validator_1 = require("class-validator");
|
|
|
19
19
|
* `tenantId` es OBLIGATORIO y explícito: la variante de agente lo tiene hardcodeado a
|
|
20
20
|
* `FIADO_BETA`, y eliminar ese hardcode es parte del contrato de este endpoint privado.
|
|
21
21
|
*
|
|
22
|
-
* ⚠️ PII:
|
|
22
|
+
* ⚠️ PII: teléfono — nunca loguear el request completo.
|
|
23
23
|
*/
|
|
24
24
|
class SignUpProspectRequest {
|
|
25
25
|
}
|
|
26
26
|
exports.SignUpProspectRequest = SignUpProspectRequest;
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, class_transformer_1.Expose)(),
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
30
|
(0, class_validator_1.IsString)(),
|
|
30
31
|
(0, class_validator_1.IsNotEmpty)(),
|
|
31
32
|
__metadata("design:type", String)
|
package/bin/index.d.ts
CHANGED
package/bin/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.IssuanceBusiness = exports.Blacklist = exports.CentralPayments = exports.Helpdesk = exports.FiadoApiResponse = exports.Auth = exports.LegalDocumentsBusiness = exports.Role = exports.STPAccount = exports.RiskProfile = exports.FraudPreventionEngine = exports.BBVARst = exports.Stp = exports.BenefitCenter = exports.BankAccount = exports.P2pContact = exports.CreditContract = exports.Contract = exports.ProductCatalog = exports.ContactInfo = exports.TransactionAnalytics = exports.Transaction = exports.TransactionProcessor = exports.GenericMessage = exports.EventBridgeMessage = exports.SessionActivity = exports.NotificationMessages = exports.ServicePayment = exports.Header = exports.Identity = exports.UserTags = exports.Group = exports.File = exports.ExchangeRate = exports.Directory = exports.Currency = exports.Country = exports.Card = exports.Authentication = exports.AppContent = exports.App = exports.Offices = exports.Places = exports.Address = exports.Beneficiary = exports.Activity = exports.Biometrics = exports.MetamapConnector = exports.Account = exports.Crypto = void 0;
|
|
40
40
|
exports.LoanConfig = exports.DatalakeQuery = exports.RetailWizard = exports.RetailCustomer = exports.RetailCards = exports.RetailCatalog = exports.RetailCommission = exports.RetailOrg = exports.EmailVerification = exports.NetworkConnector = exports.Modelias = exports.TotpSecurity = exports.Passport = exports.WalletFunding = exports.Remittance = exports.PlatformRbac = exports.CognitoBackofficeConnector = exports.TwilioConnector = exports.MessagesConnector = exports.Mdm = exports.MilestoneBusiness = exports.CirculoCredito = exports.CreditStatements = exports.Sentry = exports.AiEngine = exports.Funnel = exports.TeamsConnector = exports.PlatformErrorEvents = exports.CustomerFile = exports.CreditBackoffice = exports.CreditDashboard = exports.CreditEngine = exports.Credit = exports.ComissionBusiness = exports.ReferralBusiness = exports.ZendeskMessaging = exports.NotificationWS = exports.Event = exports.PayrollBusiness = exports.Cnbv = exports.DirectorySetting = exports.InvoiceCollector = exports.Collector = exports.Pricelist = exports.Company = exports.Services = exports.AccountIssuanceBusiness = exports.AppSelectionData = exports.Device = exports.Observations = void 0;
|
|
41
|
-
exports.Collection = exports.Shipping = exports.PhoneSales = exports.Onboarding = exports.Kyc = exports.LoanScoring = exports.LoanCredit = exports.LoanCollectorAssignment = exports.LoanOfferings = exports.Shortlink = void 0;
|
|
41
|
+
exports.UserConfirmations = exports.Collection = exports.Shipping = exports.PhoneSales = exports.Onboarding = exports.Kyc = exports.LoanScoring = exports.LoanCredit = exports.LoanCollectorAssignment = exports.LoanOfferings = exports.Shortlink = void 0;
|
|
42
42
|
exports.Crypto = __importStar(require("./crypto"));
|
|
43
43
|
exports.Account = __importStar(require("./account"));
|
|
44
44
|
exports.MetamapConnector = __importStar(require("./metamapConnector"));
|
|
@@ -204,3 +204,6 @@ exports.Shipping = __importStar(require("./shipping"));
|
|
|
204
204
|
// CollectResponse el contrato dominio↔motor; AuthorizeCollectionMovementRequest/Response el
|
|
205
205
|
// contrato motor↔processor. Ver spec 2026-07-29-motor-cobro-central-design.
|
|
206
206
|
exports.Collection = __importStar(require("./collection"));
|
|
207
|
+
// UserConfirmations: contrato del motor de confirmaciones pendientes (people-business ↔ app) —
|
|
208
|
+
// la app consulta qué confirmaciones mostrar al usuario (verificar email, …) y reporta descartes.
|
|
209
|
+
exports.UserConfirmations = __importStar(require("./userConfirmations"));
|
|
@@ -2,10 +2,8 @@ import { WizardConsents } from '../WizardConsents';
|
|
|
2
2
|
/**
|
|
3
3
|
* POST /wizard/sessions/:id/consents — registra los consentimientos VL + contrato PCF. Dispara la
|
|
4
4
|
* tríada Fiado idempotente (D26): lookup directory por phone → reusa o crea onboarding+people+directory.
|
|
5
|
-
*
|
|
5
|
+
* SureKeep Fase 2 — pista Retail.
|
|
6
6
|
*/
|
|
7
7
|
export declare class ConsentsRequest {
|
|
8
8
|
consents: WizardConsents;
|
|
9
|
-
/** Nombre del cliente (para la creación de identidad Fiado si aún no existe). */
|
|
10
|
-
customerName?: string;
|
|
11
9
|
}
|
|
@@ -16,7 +16,7 @@ const WizardConsents_1 = require("../WizardConsents");
|
|
|
16
16
|
/**
|
|
17
17
|
* POST /wizard/sessions/:id/consents — registra los consentimientos VL + contrato PCF. Dispara la
|
|
18
18
|
* tríada Fiado idempotente (D26): lookup directory por phone → reusa o crea onboarding+people+directory.
|
|
19
|
-
*
|
|
19
|
+
* SureKeep Fase 2 — pista Retail.
|
|
20
20
|
*/
|
|
21
21
|
class ConsentsRequest {
|
|
22
22
|
}
|
|
@@ -27,9 +27,3 @@ __decorate([
|
|
|
27
27
|
(0, class_validator_1.ValidateNested)(),
|
|
28
28
|
__metadata("design:type", WizardConsents_1.WizardConsents)
|
|
29
29
|
], ConsentsRequest.prototype, "consents", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, class_transformer_1.Expose)(),
|
|
32
|
-
(0, class_validator_1.IsOptional)(),
|
|
33
|
-
(0, class_validator_1.IsString)(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], ConsentsRequest.prototype, "customerName", void 0);
|
|
@@ -0,0 +1,26 @@
|
|
|
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.ConfirmationDismissRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const ConfirmationTypeEnum_1 = require("../enums/ConfirmationTypeEnum");
|
|
16
|
+
/**
|
|
17
|
+
* Solicitud del usuario para descartar una confirmación pendiente.
|
|
18
|
+
*/
|
|
19
|
+
class ConfirmationDismissRequest {
|
|
20
|
+
}
|
|
21
|
+
exports.ConfirmationDismissRequest = ConfirmationDismissRequest;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.IsEnum)(ConfirmationTypeEnum_1.ConfirmationTypeEnum),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ConfirmationDismissRequest.prototype, "confirmationType", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConfirmationTypeEnum } from '../enums/ConfirmationTypeEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Confirmación descartada y el momento del descarte (epoch ms).
|
|
4
|
+
*/
|
|
5
|
+
export declare class ConfirmationDismissResponse {
|
|
6
|
+
confirmationType: ConfirmationTypeEnum;
|
|
7
|
+
dismissedAt: number;
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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.ConfirmationDismissResponse = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const ConfirmationTypeEnum_1 = require("../enums/ConfirmationTypeEnum");
|
|
15
|
+
/**
|
|
16
|
+
* Confirmación descartada y el momento del descarte (epoch ms).
|
|
17
|
+
*/
|
|
18
|
+
class ConfirmationDismissResponse {
|
|
19
|
+
}
|
|
20
|
+
exports.ConfirmationDismissResponse = ConfirmationDismissResponse;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ConfirmationDismissResponse.prototype, "confirmationType", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], ConfirmationDismissResponse.prototype, "dismissedAt", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EmailVerificationStatusEnum } from '../../emailVerification/enums/EmailVerificationStatusEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Payload de la confirmación EMAIL_VERIFICATION: el email pendiente y su estado actual.
|
|
4
|
+
*/
|
|
5
|
+
export declare class EmailConfirmationPayload {
|
|
6
|
+
email: string;
|
|
7
|
+
status: EmailVerificationStatusEnum;
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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.EmailConfirmationPayload = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const EmailVerificationStatusEnum_1 = require("../../emailVerification/enums/EmailVerificationStatusEnum");
|
|
15
|
+
/**
|
|
16
|
+
* Payload de la confirmación EMAIL_VERIFICATION: el email pendiente y su estado actual.
|
|
17
|
+
*/
|
|
18
|
+
class EmailConfirmationPayload {
|
|
19
|
+
}
|
|
20
|
+
exports.EmailConfirmationPayload = EmailConfirmationPayload;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], EmailConfirmationPayload.prototype, "email", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], EmailConfirmationPayload.prototype, "status", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConfirmationTypeEnum } from '../enums/ConfirmationTypeEnum';
|
|
2
|
+
import { ConfirmationDisplayModeEnum } from '../enums/ConfirmationDisplayModeEnum';
|
|
3
|
+
import { EmailConfirmationPayload } from './EmailConfirmationPayload';
|
|
4
|
+
/**
|
|
5
|
+
* Una confirmación pendiente que la app debe mostrarle al usuario.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PendingConfirmationItem {
|
|
8
|
+
confirmationType: ConfirmationTypeEnum;
|
|
9
|
+
priority: number;
|
|
10
|
+
displayMode: ConfirmationDisplayModeEnum;
|
|
11
|
+
/** Presente solo cuando confirmationType === EMAIL_VERIFICATION. */
|
|
12
|
+
payload?: EmailConfirmationPayload;
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.PendingConfirmationItem = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const ConfirmationTypeEnum_1 = require("../enums/ConfirmationTypeEnum");
|
|
15
|
+
const ConfirmationDisplayModeEnum_1 = require("../enums/ConfirmationDisplayModeEnum");
|
|
16
|
+
const EmailConfirmationPayload_1 = require("./EmailConfirmationPayload");
|
|
17
|
+
/**
|
|
18
|
+
* Una confirmación pendiente que la app debe mostrarle al usuario.
|
|
19
|
+
*/
|
|
20
|
+
class PendingConfirmationItem {
|
|
21
|
+
}
|
|
22
|
+
exports.PendingConfirmationItem = PendingConfirmationItem;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], PendingConfirmationItem.prototype, "confirmationType", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], PendingConfirmationItem.prototype, "priority", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], PendingConfirmationItem.prototype, "displayMode", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
__metadata("design:type", EmailConfirmationPayload_1.EmailConfirmationPayload)
|
|
38
|
+
], PendingConfirmationItem.prototype, "payload", void 0);
|
|
@@ -0,0 +1,23 @@
|
|
|
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.PendingConfirmationsResponse = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
/**
|
|
15
|
+
* Confirmaciones pendientes del usuario, ordenadas por prioridad.
|
|
16
|
+
*/
|
|
17
|
+
class PendingConfirmationsResponse {
|
|
18
|
+
}
|
|
19
|
+
exports.PendingConfirmationsResponse = PendingConfirmationsResponse;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
__metadata("design:type", Array)
|
|
23
|
+
], PendingConfirmationsResponse.prototype, "items", void 0);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cómo debe presentar la app una confirmación pendiente.
|
|
3
|
+
* SINGLE: modal exclusivo, no se combina con otras confirmaciones.
|
|
4
|
+
* STACKABLE: puede apilarse junto a otras confirmaciones en la misma vista.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum ConfirmationDisplayModeEnum {
|
|
7
|
+
SINGLE = "SINGLE",
|
|
8
|
+
STACKABLE = "STACKABLE"
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfirmationDisplayModeEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Cómo debe presentar la app una confirmación pendiente.
|
|
6
|
+
* SINGLE: modal exclusivo, no se combina con otras confirmaciones.
|
|
7
|
+
* STACKABLE: puede apilarse junto a otras confirmaciones en la misma vista.
|
|
8
|
+
*/
|
|
9
|
+
var ConfirmationDisplayModeEnum;
|
|
10
|
+
(function (ConfirmationDisplayModeEnum) {
|
|
11
|
+
ConfirmationDisplayModeEnum["SINGLE"] = "SINGLE";
|
|
12
|
+
ConfirmationDisplayModeEnum["STACKABLE"] = "STACKABLE";
|
|
13
|
+
})(ConfirmationDisplayModeEnum || (exports.ConfirmationDisplayModeEnum = ConfirmationDisplayModeEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfirmationTypeEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Tipo de confirmación pendiente que el motor de confirmaciones puede pedirle al usuario.
|
|
6
|
+
*/
|
|
7
|
+
var ConfirmationTypeEnum;
|
|
8
|
+
(function (ConfirmationTypeEnum) {
|
|
9
|
+
ConfirmationTypeEnum["EMAIL_VERIFICATION"] = "EMAIL_VERIFICATION";
|
|
10
|
+
})(ConfirmationTypeEnum || (exports.ConfirmationTypeEnum = ConfirmationTypeEnum = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './enums/ConfirmationTypeEnum';
|
|
2
|
+
export * from './enums/ConfirmationDisplayModeEnum';
|
|
3
|
+
export * from './dtos/EmailConfirmationPayload';
|
|
4
|
+
export * from './dtos/PendingConfirmationItem';
|
|
5
|
+
export * from './dtos/PendingConfirmationsResponse';
|
|
6
|
+
export * from './dtos/ConfirmationDismissRequest';
|
|
7
|
+
export * from './dtos/ConfirmationDismissResponse';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enums/ConfirmationTypeEnum"), exports);
|
|
18
|
+
__exportStar(require("./enums/ConfirmationDisplayModeEnum"), exports);
|
|
19
|
+
__exportStar(require("./dtos/EmailConfirmationPayload"), exports);
|
|
20
|
+
__exportStar(require("./dtos/PendingConfirmationItem"), exports);
|
|
21
|
+
__exportStar(require("./dtos/PendingConfirmationsResponse"), exports);
|
|
22
|
+
__exportStar(require("./dtos/ConfirmationDismissRequest"), exports);
|
|
23
|
+
__exportStar(require("./dtos/ConfirmationDismissResponse"), exports);
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Expose } from 'class-transformer';
|
|
2
|
-
import { IsNotEmpty, IsString } from 'class-validator';
|
|
2
|
+
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Alta de prospecto M2M en `auth-business` (crea onboarding + People + DirectoryUser).
|
|
@@ -8,11 +8,12 @@ import { IsNotEmpty, IsString } from 'class-validator';
|
|
|
8
8
|
* `tenantId` es OBLIGATORIO y explícito: la variante de agente lo tiene hardcodeado a
|
|
9
9
|
* `FIADO_BETA`, y eliminar ese hardcode es parte del contrato de este endpoint privado.
|
|
10
10
|
*
|
|
11
|
-
* ⚠️ PII:
|
|
11
|
+
* ⚠️ PII: teléfono — nunca loguear el request completo.
|
|
12
12
|
*/
|
|
13
13
|
export class SignUpProspectRequest {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/** Opcional: sin nombre la persona se crea sin `preferredName`; el real lo escribe el KYC después. */
|
|
15
|
+
@Expose() @IsOptional() @IsString() @IsNotEmpty()
|
|
16
|
+
name?: string;
|
|
16
17
|
|
|
17
18
|
@Expose() @IsString() @IsNotEmpty()
|
|
18
19
|
phoneNumber!: string;
|
package/src/index.ts
CHANGED
|
@@ -163,3 +163,6 @@ export * as Shipping from './shipping';
|
|
|
163
163
|
// CollectResponse el contrato dominio↔motor; AuthorizeCollectionMovementRequest/Response el
|
|
164
164
|
// contrato motor↔processor. Ver spec 2026-07-29-motor-cobro-central-design.
|
|
165
165
|
export * as Collection from './collection';
|
|
166
|
+
// UserConfirmations: contrato del motor de confirmaciones pendientes (people-business ↔ app) —
|
|
167
|
+
// la app consulta qué confirmaciones mostrar al usuario (verificar email, …) y reporta descartes.
|
|
168
|
+
export * as UserConfirmations from './userConfirmations';
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { Expose, Type } from 'class-transformer';
|
|
2
|
-
import {
|
|
2
|
+
import { ValidateNested } from 'class-validator';
|
|
3
3
|
import { WizardConsents } from '../WizardConsents';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* POST /wizard/sessions/:id/consents — registra los consentimientos VL + contrato PCF. Dispara la
|
|
7
7
|
* tríada Fiado idempotente (D26): lookup directory por phone → reusa o crea onboarding+people+directory.
|
|
8
|
-
*
|
|
8
|
+
* SureKeep Fase 2 — pista Retail.
|
|
9
9
|
*/
|
|
10
10
|
export class ConsentsRequest {
|
|
11
11
|
@Expose()
|
|
12
12
|
@Type(() => WizardConsents)
|
|
13
13
|
@ValidateNested()
|
|
14
14
|
consents!: WizardConsents;
|
|
15
|
-
|
|
16
|
-
/** Nombre del cliente (para la creación de identidad Fiado si aún no existe). */
|
|
17
|
-
@Expose()
|
|
18
|
-
@IsOptional()
|
|
19
|
-
@IsString()
|
|
20
|
-
customerName?: string;
|
|
21
15
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsEnum } from 'class-validator';
|
|
3
|
+
import { ConfirmationTypeEnum } from '../enums/ConfirmationTypeEnum';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Solicitud del usuario para descartar una confirmación pendiente.
|
|
7
|
+
*/
|
|
8
|
+
export class ConfirmationDismissRequest {
|
|
9
|
+
@Expose()
|
|
10
|
+
@IsEnum(ConfirmationTypeEnum)
|
|
11
|
+
confirmationType!: ConfirmationTypeEnum;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { ConfirmationTypeEnum } from '../enums/ConfirmationTypeEnum';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Confirmación descartada y el momento del descarte (epoch ms).
|
|
6
|
+
*/
|
|
7
|
+
export class ConfirmationDismissResponse {
|
|
8
|
+
@Expose()
|
|
9
|
+
confirmationType!: ConfirmationTypeEnum;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
dismissedAt!: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { EmailVerificationStatusEnum } from '../../emailVerification/enums/EmailVerificationStatusEnum';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Payload de la confirmación EMAIL_VERIFICATION: el email pendiente y su estado actual.
|
|
6
|
+
*/
|
|
7
|
+
export class EmailConfirmationPayload {
|
|
8
|
+
@Expose()
|
|
9
|
+
email!: string;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
status!: EmailVerificationStatusEnum;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { ConfirmationTypeEnum } from '../enums/ConfirmationTypeEnum';
|
|
3
|
+
import { ConfirmationDisplayModeEnum } from '../enums/ConfirmationDisplayModeEnum';
|
|
4
|
+
import { EmailConfirmationPayload } from './EmailConfirmationPayload';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Una confirmación pendiente que la app debe mostrarle al usuario.
|
|
8
|
+
*/
|
|
9
|
+
export class PendingConfirmationItem {
|
|
10
|
+
@Expose()
|
|
11
|
+
confirmationType!: ConfirmationTypeEnum;
|
|
12
|
+
|
|
13
|
+
@Expose()
|
|
14
|
+
priority!: number;
|
|
15
|
+
|
|
16
|
+
@Expose()
|
|
17
|
+
displayMode!: ConfirmationDisplayModeEnum;
|
|
18
|
+
|
|
19
|
+
/** Presente solo cuando confirmationType === EMAIL_VERIFICATION. */
|
|
20
|
+
@Expose()
|
|
21
|
+
payload?: EmailConfirmationPayload;
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { PendingConfirmationItem } from './PendingConfirmationItem';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Confirmaciones pendientes del usuario, ordenadas por prioridad.
|
|
6
|
+
*/
|
|
7
|
+
export class PendingConfirmationsResponse {
|
|
8
|
+
@Expose()
|
|
9
|
+
items!: PendingConfirmationItem[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cómo debe presentar la app una confirmación pendiente.
|
|
3
|
+
* SINGLE: modal exclusivo, no se combina con otras confirmaciones.
|
|
4
|
+
* STACKABLE: puede apilarse junto a otras confirmaciones en la misma vista.
|
|
5
|
+
*/
|
|
6
|
+
export enum ConfirmationDisplayModeEnum {
|
|
7
|
+
SINGLE = 'SINGLE',
|
|
8
|
+
STACKABLE = 'STACKABLE',
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './enums/ConfirmationTypeEnum';
|
|
2
|
+
export * from './enums/ConfirmationDisplayModeEnum';
|
|
3
|
+
export * from './dtos/EmailConfirmationPayload';
|
|
4
|
+
export * from './dtos/PendingConfirmationItem';
|
|
5
|
+
export * from './dtos/PendingConfirmationsResponse';
|
|
6
|
+
export * from './dtos/ConfirmationDismissRequest';
|
|
7
|
+
export * from './dtos/ConfirmationDismissResponse';
|