@fiado/type-kit 3.216.0 → 3.218.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/index.d.ts +1 -0
- package/bin/index.js +4 -1
- package/bin/phoneSales/CreateDeviceVariantRequestDto.d.ts +6 -0
- package/bin/{platformRbac/dtos/ResendOtpRequest.js → phoneSales/CreateDeviceVariantRequestDto.js} +15 -18
- package/bin/phoneSales/CreateSaleRequestDto.d.ts +5 -0
- package/bin/{platformRbac/dtos/ResendSelfRegisterOtpRequest.js → phoneSales/CreateSaleRequestDto.js} +10 -18
- package/bin/phoneSales/DeviceVariantResponseDto.d.ts +8 -0
- package/bin/phoneSales/DeviceVariantResponseDto.js +6 -0
- package/bin/phoneSales/RedeemSaleCodeRequestDto.d.ts +4 -0
- package/bin/phoneSales/RedeemSaleCodeRequestDto.js +24 -0
- package/bin/phoneSales/SaleResponseDto.d.ts +11 -0
- package/bin/phoneSales/SaleResponseDto.js +6 -0
- package/bin/phoneSales/index.d.ts +5 -0
- package/bin/phoneSales/index.js +21 -0
- package/bin/retailWizard/dtos/WizardProduct.d.ts +41 -0
- package/bin/retailWizard/dtos/WizardProduct.js +2 -0
- package/bin/retailWizard/dtos/WizardSession.d.ts +7 -0
- package/bin/retailWizard/index.d.ts +1 -0
- package/bin/retailWizard/index.js +1 -0
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/phoneSales/CreateDeviceVariantRequestDto.ts +16 -0
- package/src/phoneSales/CreateSaleRequestDto.ts +12 -0
- package/src/phoneSales/DeviceVariantResponseDto.ts +8 -0
- package/src/phoneSales/RedeemSaleCodeRequestDto.ts +9 -0
- package/src/phoneSales/SaleResponseDto.ts +11 -0
- package/src/phoneSales/index.ts +5 -0
- package/src/retailWizard/dtos/WizardProduct.ts +41 -0
- package/src/retailWizard/dtos/WizardSession.ts +7 -0
- package/src/retailWizard/index.ts +1 -0
- package/bin/benefitCenter/enums/BenefitFlowEnum.d.ts +0 -11
- package/bin/benefitCenter/enums/BenefitFlowEnum.js +0 -15
- 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
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.Device = exports.Observations = 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.Account = exports.Crypto = void 0;
|
|
40
40
|
exports.LoanCredit = exports.LoanCollectorAssignment = exports.LoanOfferings = exports.Shortlink = exports.LoanConfig = exports.RetailWizard = exports.RetailCustomer = exports.RetailCards = exports.RetailCatalog = 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 = void 0;
|
|
41
|
-
exports.Kyc = exports.LoanScoring = void 0;
|
|
41
|
+
exports.PhoneSales = exports.Kyc = exports.LoanScoring = void 0;
|
|
42
42
|
exports.Crypto = __importStar(require("./crypto"));
|
|
43
43
|
exports.Account = __importStar(require("./account"));
|
|
44
44
|
exports.Activity = __importStar(require("./activity"));
|
|
@@ -181,3 +181,6 @@ exports.LoanScoring = __importStar(require("./loanScoring"));
|
|
|
181
181
|
exports.Kyc = __importStar(require("./kyc"));
|
|
182
182
|
__exportStar(require("./messaging"), exports);
|
|
183
183
|
__exportStar(require("./complaint"), exports);
|
|
184
|
+
// PhoneSales: DTOs del lambda cell-phone-sales-business — variantes de dispositivo (modelo/color/
|
|
185
|
+
// storage/precio/stock), venta con delivery PICKUP|HOME y redención de código de referencia.
|
|
186
|
+
exports.PhoneSales = __importStar(require("./phoneSales"));
|
package/bin/{platformRbac/dtos/ResendOtpRequest.js → phoneSales/CreateDeviceVariantRequestDto.js}
RENAMED
|
@@ -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.CreateDeviceVariantRequestDto = void 0;
|
|
14
13
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
|
|
16
|
-
* Body del POST /auth/resend-otp (público, anónimo). DEC-RBAC-054.
|
|
17
|
-
* Reenvía el OTP del login re-disparando el challenge real CUSTOM_AUTH (EMAIL_OTP) para la
|
|
18
|
-
* identidad SIN password. `tenantId` obligatorio (DEC-064 — el picker ya lo resolvió, NO "solo email").
|
|
19
|
-
* El email se normaliza lowercase server-side. Postura anti-enumeración: respuesta 200 genérica
|
|
20
|
-
* siempre, sin filtrar existencia (ver AuthLoginManager.resendChallengeOtp).
|
|
21
|
-
*/
|
|
22
|
-
class ResendOtpRequest {
|
|
14
|
+
class CreateDeviceVariantRequestDto {
|
|
23
15
|
}
|
|
24
|
-
exports.
|
|
16
|
+
exports.CreateDeviceVariantRequestDto = CreateDeviceVariantRequestDto;
|
|
25
17
|
__decorate([
|
|
26
|
-
(0,
|
|
27
|
-
(0, class_validator_1.IsEmail)(),
|
|
28
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
29
19
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
20
|
+
], CreateDeviceVariantRequestDto.prototype, "model", void 0);
|
|
31
21
|
__decorate([
|
|
32
|
-
(0, class_transformer_1.Expose)(),
|
|
33
22
|
(0, class_validator_1.IsString)(),
|
|
34
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
35
23
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
24
|
+
], CreateDeviceVariantRequestDto.prototype, "color", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CreateDeviceVariantRequestDto.prototype, "storage", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsNumber)(),
|
|
31
|
+
(0, class_validator_1.Min)(0),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], CreateDeviceVariantRequestDto.prototype, "price", void 0);
|
package/bin/{platformRbac/dtos/ResendSelfRegisterOtpRequest.js → phoneSales/CreateSaleRequestDto.js}
RENAMED
|
@@ -9,28 +9,20 @@ 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.CreateSaleRequestDto = void 0;
|
|
14
13
|
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 {
|
|
14
|
+
class CreateSaleRequestDto {
|
|
23
15
|
}
|
|
24
|
-
exports.
|
|
16
|
+
exports.CreateSaleRequestDto = CreateSaleRequestDto;
|
|
25
17
|
__decorate([
|
|
26
|
-
(0, class_transformer_1.Expose)(),
|
|
27
18
|
(0, class_validator_1.IsString)(),
|
|
28
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
29
19
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
20
|
+
], CreateSaleRequestDto.prototype, "variantId", void 0);
|
|
31
21
|
__decorate([
|
|
32
|
-
(0,
|
|
33
|
-
(0, class_validator_1.IsEmail)(),
|
|
34
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
(0, class_validator_1.IsIn)(['PICKUP', 'HOME']),
|
|
35
23
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
24
|
+
], CreateSaleRequestDto.prototype, "deliveryType", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsObject)(),
|
|
27
|
+
__metadata("design:type", Object)
|
|
28
|
+
], CreateSaleRequestDto.prototype, "deliveryData", void 0);
|
|
@@ -0,0 +1,24 @@
|
|
|
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.RedeemSaleCodeRequestDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class RedeemSaleCodeRequestDto {
|
|
15
|
+
}
|
|
16
|
+
exports.RedeemSaleCodeRequestDto = RedeemSaleCodeRequestDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], RedeemSaleCodeRequestDto.prototype, "referenceCode", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], RedeemSaleCodeRequestDto.prototype, "newAccountDirectorId", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class SaleResponseDto {
|
|
2
|
+
id: string;
|
|
3
|
+
referenceCode: string;
|
|
4
|
+
variantId: string;
|
|
5
|
+
buyerDirectorId: string;
|
|
6
|
+
newAccountDirectorId: string | null;
|
|
7
|
+
deliveryType: 'PICKUP' | 'HOME';
|
|
8
|
+
trackingCode: string | null;
|
|
9
|
+
providerStatus: string | null;
|
|
10
|
+
status: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./DeviceVariantResponseDto"), exports);
|
|
18
|
+
__exportStar(require("./CreateDeviceVariantRequestDto"), exports);
|
|
19
|
+
__exportStar(require("./CreateSaleRequestDto"), exports);
|
|
20
|
+
__exportStar(require("./SaleResponseDto"), exports);
|
|
21
|
+
__exportStar(require("./RedeemSaleCodeRequestDto"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ficha COMERCIAL del equipo reservado, congelada en la sesión al momento de reservarlo (S03).
|
|
3
|
+
*
|
|
4
|
+
* **Por qué un snapshot y no una lectura del catálogo en cada `GET`:**
|
|
5
|
+
* 1. Una venta se cotiza al instante en que se reserva. Si el catálogo cambia el precio o retira el
|
|
6
|
+
* modelo mientras el vendedor sigue en el wizard, la venta en curso NO debe cambiar debajo de él
|
|
7
|
+
* — el precio ancla el cobro (`amountCents == cashPrice`) y el contrato ya se le mostró al cliente.
|
|
8
|
+
* 2. El front pollea la sesión cada 3–5 s durante el KYC (D20). Resolver el catálogo en cada lectura
|
|
9
|
+
* convertiría ese poll en un llamado cross-lambda por tick.
|
|
10
|
+
*
|
|
11
|
+
* Lo llena `addProduct`, que YA consulta el catálogo para elegir la unidad física y su precio: los
|
|
12
|
+
* datos salen de la MISMA lectura, sin viajes extra.
|
|
13
|
+
*
|
|
14
|
+
* ⚠️ NO lleva `stock`: es volátil por definición y no describe la unidad ya reservada (que por
|
|
15
|
+
* definición dejó de estar disponible). El stock vive en el catálogo y solo importa en el paso 03.
|
|
16
|
+
*
|
|
17
|
+
* SureKeep Fase 2 — pista Retail.
|
|
18
|
+
*/
|
|
19
|
+
export interface WizardProduct {
|
|
20
|
+
/** SKU del modelo comercial. Espeja `WizardSession.reservedSku`. */
|
|
21
|
+
sku: string;
|
|
22
|
+
/** Unidad física reservada. Espeja `WizardSession.reservedImei`. */
|
|
23
|
+
imei: string;
|
|
24
|
+
/**
|
|
25
|
+
* Precio de contado en centavos, TAL COMO estaba en el catálogo al reservar. Es el ancla del
|
|
26
|
+
* cobro: `registerPayment` exige `amountCents == cashPriceCents`.
|
|
27
|
+
*/
|
|
28
|
+
cashPriceCents: number;
|
|
29
|
+
brand: string;
|
|
30
|
+
model: string;
|
|
31
|
+
capacity: string;
|
|
32
|
+
color: string;
|
|
33
|
+
imageUrl: string | null;
|
|
34
|
+
/** Gama del equipo (`PREMIUM` / `HIGH` / `MID` …). La define el catálogo, no el wizard. */
|
|
35
|
+
tier: string;
|
|
36
|
+
/**
|
|
37
|
+
* Financieras alternativas elegibles para este producto (derivación externa, paso 04).
|
|
38
|
+
* Mismo nombre que en `retail-catalog`: es su dato, no se renombra al cruzar la frontera.
|
|
39
|
+
*/
|
|
40
|
+
eligibleFinanciers: string[];
|
|
41
|
+
}
|
|
@@ -7,6 +7,7 @@ import type { OccupationEnum } from '../enums/OccupationEnum';
|
|
|
7
7
|
import type { WizardConsents } from './WizardConsents';
|
|
8
8
|
import type { WizardLoan } from './WizardLoan';
|
|
9
9
|
import type { WizardPayment } from './WizardPayment';
|
|
10
|
+
import type { WizardProduct } from './WizardProduct';
|
|
10
11
|
import type { WizardWelcome } from './WizardWelcome';
|
|
11
12
|
/** Modalidad de captura del KYC (M1 §213-329). */
|
|
12
13
|
export type KycModality = 'CUSTOMER_LINK' | 'STORE_DEVICE' | 'MANUAL';
|
|
@@ -46,6 +47,12 @@ export interface WizardSession {
|
|
|
46
47
|
accountStatus: AccountStatus | null;
|
|
47
48
|
reservedSku: string | null;
|
|
48
49
|
reservedImei: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Ficha comercial del equipo reservado (marca, modelo, precio, financieras), congelada al
|
|
52
|
+
* reservar. `reservedSku`/`reservedImei` siguen siendo la fuente de verdad de QUÉ unidad está
|
|
53
|
+
* tomada; esto es lo que hace falta para PINTARLA sin volver al catálogo. Null antes del S03.
|
|
54
|
+
*/
|
|
55
|
+
product: WizardProduct | null;
|
|
49
56
|
reservationExpiresAt: string | null;
|
|
50
57
|
paymentMethod: PaymentMethodEnum | null;
|
|
51
58
|
externalProvider: ExternalProviderEnum | null;
|
|
@@ -14,6 +14,7 @@ export * from './enums/OccupationEnum';
|
|
|
14
14
|
export * from './enums/BeneficiaryRelationEnum';
|
|
15
15
|
export * from './dtos/WizardConsents';
|
|
16
16
|
export * from './dtos/WizardPayment';
|
|
17
|
+
export * from './dtos/WizardProduct';
|
|
17
18
|
export * from './dtos/WizardWelcome';
|
|
18
19
|
export * from './dtos/SalePaymentDetail';
|
|
19
20
|
export * from './dtos/ProspectNewCustomer';
|
|
@@ -32,6 +32,7 @@ __exportStar(require("./enums/BeneficiaryRelationEnum"), exports);
|
|
|
32
32
|
// DTOs anidados
|
|
33
33
|
__exportStar(require("./dtos/WizardConsents"), exports);
|
|
34
34
|
__exportStar(require("./dtos/WizardPayment"), exports);
|
|
35
|
+
__exportStar(require("./dtos/WizardProduct"), exports);
|
|
35
36
|
__exportStar(require("./dtos/WizardWelcome"), exports);
|
|
36
37
|
__exportStar(require("./dtos/SalePaymentDetail"), exports);
|
|
37
38
|
__exportStar(require("./dtos/ProspectNewCustomer"), exports);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -140,3 +140,6 @@ export * as LoanScoring from './loanScoring';
|
|
|
140
140
|
export * as Kyc from './kyc';
|
|
141
141
|
export * from './messaging';
|
|
142
142
|
export * from './complaint';
|
|
143
|
+
// PhoneSales: DTOs del lambda cell-phone-sales-business — variantes de dispositivo (modelo/color/
|
|
144
|
+
// storage/precio/stock), venta con delivery PICKUP|HOME y redención de código de referencia.
|
|
145
|
+
export * as PhoneSales from './phoneSales';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IsString, IsNumber, Min } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
export class CreateDeviceVariantRequestDto {
|
|
4
|
+
@IsString()
|
|
5
|
+
model!: string;
|
|
6
|
+
|
|
7
|
+
@IsString()
|
|
8
|
+
color!: string;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
storage!: string;
|
|
12
|
+
|
|
13
|
+
@IsNumber()
|
|
14
|
+
@Min(0)
|
|
15
|
+
price!: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IsString, IsIn, IsObject } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
export class CreateSaleRequestDto {
|
|
4
|
+
@IsString()
|
|
5
|
+
variantId!: string;
|
|
6
|
+
|
|
7
|
+
@IsIn(['PICKUP', 'HOME'])
|
|
8
|
+
deliveryType!: 'PICKUP' | 'HOME';
|
|
9
|
+
|
|
10
|
+
@IsObject()
|
|
11
|
+
deliveryData!: Record<string, unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class SaleResponseDto {
|
|
2
|
+
id!: string;
|
|
3
|
+
referenceCode!: string;
|
|
4
|
+
variantId!: string;
|
|
5
|
+
buyerDirectorId!: string;
|
|
6
|
+
newAccountDirectorId!: string | null;
|
|
7
|
+
deliveryType!: 'PICKUP' | 'HOME';
|
|
8
|
+
trackingCode!: string | null;
|
|
9
|
+
providerStatus!: string | null;
|
|
10
|
+
status!: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ficha COMERCIAL del equipo reservado, congelada en la sesión al momento de reservarlo (S03).
|
|
3
|
+
*
|
|
4
|
+
* **Por qué un snapshot y no una lectura del catálogo en cada `GET`:**
|
|
5
|
+
* 1. Una venta se cotiza al instante en que se reserva. Si el catálogo cambia el precio o retira el
|
|
6
|
+
* modelo mientras el vendedor sigue en el wizard, la venta en curso NO debe cambiar debajo de él
|
|
7
|
+
* — el precio ancla el cobro (`amountCents == cashPrice`) y el contrato ya se le mostró al cliente.
|
|
8
|
+
* 2. El front pollea la sesión cada 3–5 s durante el KYC (D20). Resolver el catálogo en cada lectura
|
|
9
|
+
* convertiría ese poll en un llamado cross-lambda por tick.
|
|
10
|
+
*
|
|
11
|
+
* Lo llena `addProduct`, que YA consulta el catálogo para elegir la unidad física y su precio: los
|
|
12
|
+
* datos salen de la MISMA lectura, sin viajes extra.
|
|
13
|
+
*
|
|
14
|
+
* ⚠️ NO lleva `stock`: es volátil por definición y no describe la unidad ya reservada (que por
|
|
15
|
+
* definición dejó de estar disponible). El stock vive en el catálogo y solo importa en el paso 03.
|
|
16
|
+
*
|
|
17
|
+
* SureKeep Fase 2 — pista Retail.
|
|
18
|
+
*/
|
|
19
|
+
export interface WizardProduct {
|
|
20
|
+
/** SKU del modelo comercial. Espeja `WizardSession.reservedSku`. */
|
|
21
|
+
sku: string;
|
|
22
|
+
/** Unidad física reservada. Espeja `WizardSession.reservedImei`. */
|
|
23
|
+
imei: string;
|
|
24
|
+
/**
|
|
25
|
+
* Precio de contado en centavos, TAL COMO estaba en el catálogo al reservar. Es el ancla del
|
|
26
|
+
* cobro: `registerPayment` exige `amountCents == cashPriceCents`.
|
|
27
|
+
*/
|
|
28
|
+
cashPriceCents: number;
|
|
29
|
+
brand: string;
|
|
30
|
+
model: string;
|
|
31
|
+
capacity: string;
|
|
32
|
+
color: string;
|
|
33
|
+
imageUrl: string | null;
|
|
34
|
+
/** Gama del equipo (`PREMIUM` / `HIGH` / `MID` …). La define el catálogo, no el wizard. */
|
|
35
|
+
tier: string;
|
|
36
|
+
/**
|
|
37
|
+
* Financieras alternativas elegibles para este producto (derivación externa, paso 04).
|
|
38
|
+
* Mismo nombre que en `retail-catalog`: es su dato, no se renombra al cruzar la frontera.
|
|
39
|
+
*/
|
|
40
|
+
eligibleFinanciers: string[];
|
|
41
|
+
}
|
|
@@ -7,6 +7,7 @@ import type { OccupationEnum } from '../enums/OccupationEnum';
|
|
|
7
7
|
import type { WizardConsents } from './WizardConsents';
|
|
8
8
|
import type { WizardLoan } from './WizardLoan';
|
|
9
9
|
import type { WizardPayment } from './WizardPayment';
|
|
10
|
+
import type { WizardProduct } from './WizardProduct';
|
|
10
11
|
import type { WizardWelcome } from './WizardWelcome';
|
|
11
12
|
|
|
12
13
|
/** Modalidad de captura del KYC (M1 §213-329). */
|
|
@@ -49,6 +50,12 @@ export interface WizardSession {
|
|
|
49
50
|
accountStatus: AccountStatus | null;
|
|
50
51
|
reservedSku: string | null;
|
|
51
52
|
reservedImei: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Ficha comercial del equipo reservado (marca, modelo, precio, financieras), congelada al
|
|
55
|
+
* reservar. `reservedSku`/`reservedImei` siguen siendo la fuente de verdad de QUÉ unidad está
|
|
56
|
+
* tomada; esto es lo que hace falta para PINTARLA sin volver al catálogo. Null antes del S03.
|
|
57
|
+
*/
|
|
58
|
+
product: WizardProduct | null;
|
|
52
59
|
reservationExpiresAt: string | null;
|
|
53
60
|
paymentMethod: PaymentMethodEnum | null;
|
|
54
61
|
externalProvider: ExternalProviderEnum | null;
|
|
@@ -17,6 +17,7 @@ export * from './enums/BeneficiaryRelationEnum';
|
|
|
17
17
|
// DTOs anidados
|
|
18
18
|
export * from './dtos/WizardConsents';
|
|
19
19
|
export * from './dtos/WizardPayment';
|
|
20
|
+
export * from './dtos/WizardProduct';
|
|
20
21
|
export * from './dtos/WizardWelcome';
|
|
21
22
|
export * from './dtos/SalePaymentDetail';
|
|
22
23
|
export * from './dtos/ProspectNewCustomer';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare enum BenefitFlowEnum {
|
|
2
|
-
TOPUPS = "TOPUPS",
|
|
3
|
-
BILL_PAYMENT = "BILL_PAYMENT",
|
|
4
|
-
CREDIT = "CREDIT",
|
|
5
|
-
INSURANCE = "INSURANCE",
|
|
6
|
-
DONATION = "DONATION",
|
|
7
|
-
PHARMACY = "PHARMACY",
|
|
8
|
-
REMITTANCE = "REMITTANCE",
|
|
9
|
-
/** Fondeo de wallet PCF con efectivo via provider externo (Equality/Passport, OpenPay, …) — spec 13. */
|
|
10
|
-
WALLET_FUNDING = "WALLET_FUNDING"
|
|
11
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BenefitFlowEnum = void 0;
|
|
4
|
-
var BenefitFlowEnum;
|
|
5
|
-
(function (BenefitFlowEnum) {
|
|
6
|
-
BenefitFlowEnum["TOPUPS"] = "TOPUPS";
|
|
7
|
-
BenefitFlowEnum["BILL_PAYMENT"] = "BILL_PAYMENT";
|
|
8
|
-
BenefitFlowEnum["CREDIT"] = "CREDIT";
|
|
9
|
-
BenefitFlowEnum["INSURANCE"] = "INSURANCE";
|
|
10
|
-
BenefitFlowEnum["DONATION"] = "DONATION";
|
|
11
|
-
BenefitFlowEnum["PHARMACY"] = "PHARMACY";
|
|
12
|
-
BenefitFlowEnum["REMITTANCE"] = "REMITTANCE";
|
|
13
|
-
/** Fondeo de wallet PCF con efectivo via provider externo (Equality/Passport, OpenPay, …) — spec 13. */
|
|
14
|
-
BenefitFlowEnum["WALLET_FUNDING"] = "WALLET_FUNDING";
|
|
15
|
-
})(BenefitFlowEnum || (exports.BenefitFlowEnum = BenefitFlowEnum = {}));
|
|
@@ -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
|
-
}
|