@fiado/type-kit 3.460.0 → 3.462.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.
Files changed (199) hide show
  1. package/_test_/unit/loanCredit/customerPaymentDtos.test.ts +87 -0
  2. package/_test_/unit/loanCredit/dtos/createCustomerPaymentRequest.test.ts +78 -0
  3. package/_test_/unit/retailCatalog/catalogEnums.test.ts +34 -0
  4. package/_test_/unit/retailCatalog/stockRequests.test.ts +156 -0
  5. package/_test_/unit/retailLoan/paymentContract.test.ts +128 -0
  6. package/_test_/unit/retailWizard/multiItemRequests.test.ts +114 -0
  7. package/_test_/unit/retailWizard/multiItemShapes.test.ts +126 -0
  8. package/bin/loanCredit/dtos/requests/CreateCustomerPaymentRequest.d.ts +9 -0
  9. package/bin/loanCredit/dtos/requests/CreateCustomerPaymentRequest.js +35 -0
  10. package/bin/loanCredit/dtos/responses/LoanAdHocChargeRequested.d.ts +6 -0
  11. package/bin/loanCredit/dtos/responses/LoanCustomerPaymentOptions.d.ts +33 -0
  12. package/bin/loanCredit/dtos/responses/LoanCustomerPaymentOptions.js +2 -0
  13. package/bin/loanCredit/dtos/responses/LoanCustomerPaymentResult.d.ts +14 -0
  14. package/bin/loanCredit/dtos/responses/LoanCustomerPaymentResult.js +2 -0
  15. package/bin/loanCredit/enums/LoanCustomerPaymentTypeEnum.d.ts +5 -0
  16. package/bin/loanCredit/enums/LoanCustomerPaymentTypeEnum.js +9 -0
  17. package/bin/loanCredit/enums/LoanNextInstallmentModeEnum.d.ts +7 -0
  18. package/bin/loanCredit/enums/LoanNextInstallmentModeEnum.js +11 -0
  19. package/bin/loanCredit/enums/LoanPaymentOptionUnavailableReasonEnum.d.ts +13 -0
  20. package/bin/loanCredit/enums/LoanPaymentOptionUnavailableReasonEnum.js +17 -0
  21. package/bin/loanCredit/index.d.ts +6 -0
  22. package/bin/loanCredit/index.js +7 -0
  23. package/bin/retailCatalog/dtos/Product.d.ts +15 -1
  24. package/bin/retailCatalog/dtos/ProductComponent.d.ts +5 -0
  25. package/bin/retailCatalog/dtos/ProductComponent.js +29 -0
  26. package/bin/retailCatalog/dtos/requests/GetInventorySkuQuery.d.ts +10 -0
  27. package/bin/retailCatalog/dtos/requests/GetInventorySkuQuery.js +42 -0
  28. package/bin/retailCatalog/dtos/requests/InventoryLensQuery.d.ts +5 -0
  29. package/bin/retailCatalog/dtos/requests/InventoryLensQuery.js +11 -0
  30. package/bin/retailCatalog/dtos/requests/ReleaseStockRequest.d.ts +8 -0
  31. package/bin/retailCatalog/dtos/requests/ReleaseStockRequest.js +34 -0
  32. package/bin/retailCatalog/dtos/requests/RenewReservationsRequest.d.ts +6 -0
  33. package/bin/retailCatalog/dtos/requests/RenewReservationsRequest.js +30 -0
  34. package/bin/retailCatalog/dtos/requests/ReservationLineRef.d.ts +5 -0
  35. package/bin/retailCatalog/dtos/requests/ReservationLineRef.js +25 -0
  36. package/bin/retailCatalog/dtos/requests/ReserveStockRequest.d.ts +10 -0
  37. package/bin/retailCatalog/dtos/requests/ReserveStockRequest.js +42 -0
  38. package/bin/retailCatalog/dtos/requests/ReturnStockRequest.d.ts +9 -0
  39. package/bin/retailCatalog/dtos/requests/ReturnStockRequest.js +38 -0
  40. package/bin/retailCatalog/dtos/requests/SellStockRequest.d.ts +7 -0
  41. package/bin/retailCatalog/dtos/requests/SellStockRequest.js +34 -0
  42. package/bin/retailCatalog/dtos/requests/StockLine.d.ts +14 -0
  43. package/bin/retailCatalog/dtos/requests/StockLine.js +56 -0
  44. package/bin/retailCatalog/dtos/requests/SuggestPiecesQuery.d.ts +5 -0
  45. package/bin/retailCatalog/dtos/requests/SuggestPiecesQuery.js +26 -0
  46. package/bin/retailCatalog/dtos/requests/SyncInventoryRequest.d.ts +47 -0
  47. package/bin/retailCatalog/dtos/requests/SyncInventoryRequest.js +173 -0
  48. package/bin/retailCatalog/dtos/responses/GetInventorySkuResponse.d.ts +34 -0
  49. package/bin/retailCatalog/dtos/responses/GetInventorySkuResponse.js +2 -0
  50. package/bin/retailCatalog/dtos/responses/InventoryLensResponse.d.ts +43 -2
  51. package/bin/retailCatalog/dtos/responses/ListSkuPricesResponse.d.ts +6 -0
  52. package/bin/retailCatalog/dtos/responses/ListSkuPricesResponse.js +2 -0
  53. package/bin/retailCatalog/dtos/responses/ReleaseStockResponse.d.ts +10 -0
  54. package/bin/retailCatalog/dtos/responses/ReleaseStockResponse.js +2 -0
  55. package/bin/retailCatalog/dtos/responses/RenewReservationsResponse.d.ts +10 -0
  56. package/bin/retailCatalog/dtos/responses/RenewReservationsResponse.js +2 -0
  57. package/bin/retailCatalog/dtos/responses/ReserveStockResponse.d.ts +25 -0
  58. package/bin/retailCatalog/dtos/responses/ReserveStockResponse.js +2 -0
  59. package/bin/retailCatalog/dtos/responses/ReturnStockResponse.d.ts +4 -0
  60. package/bin/retailCatalog/dtos/responses/ReturnStockResponse.js +2 -0
  61. package/bin/retailCatalog/dtos/responses/SellStockResponse.d.ts +18 -0
  62. package/bin/retailCatalog/dtos/responses/SellStockResponse.js +2 -0
  63. package/bin/retailCatalog/dtos/responses/SkuPriceEntry.d.ts +9 -0
  64. package/bin/retailCatalog/dtos/responses/SkuPriceEntry.js +2 -0
  65. package/bin/retailCatalog/dtos/responses/StoreCatalogItem.d.ts +29 -0
  66. package/bin/retailCatalog/dtos/responses/StoreCatalogItem.js +2 -0
  67. package/bin/retailCatalog/dtos/responses/SuggestPiecesResponse.d.ts +6 -0
  68. package/bin/retailCatalog/dtos/responses/SuggestPiecesResponse.js +2 -0
  69. package/bin/retailCatalog/dtos/responses/SyncInventoryResponse.d.ts +13 -0
  70. package/bin/retailCatalog/dtos/responses/SyncInventoryResponse.js +2 -0
  71. package/bin/retailCatalog/dtos/validation/ValidateProductResponse.d.ts +6 -1
  72. package/bin/retailCatalog/enums/InventoryLensFilterEnum.d.ts +3 -1
  73. package/bin/retailCatalog/enums/InventoryLensFilterEnum.js +2 -0
  74. package/bin/retailCatalog/enums/InventoryLensPeriodEnum.d.ts +7 -0
  75. package/bin/retailCatalog/enums/InventoryLensPeriodEnum.js +11 -0
  76. package/bin/retailCatalog/enums/InventoryMovementTypeEnum.d.ts +9 -0
  77. package/bin/retailCatalog/enums/InventoryMovementTypeEnum.js +13 -0
  78. package/bin/retailCatalog/enums/InventorySyncRejectionCodeEnum.d.ts +9 -0
  79. package/bin/retailCatalog/enums/InventorySyncRejectionCodeEnum.js +13 -0
  80. package/bin/retailCatalog/enums/InventorySyncResultStatusEnum.d.ts +6 -0
  81. package/bin/retailCatalog/enums/InventorySyncResultStatusEnum.js +10 -0
  82. package/bin/retailCatalog/enums/PriceSourceEnum.d.ts +4 -0
  83. package/bin/retailCatalog/enums/PriceSourceEnum.js +8 -0
  84. package/bin/retailCatalog/enums/ProductCategoryEnum.d.ts +9 -0
  85. package/bin/retailCatalog/enums/ProductCategoryEnum.js +13 -0
  86. package/bin/retailCatalog/enums/TrackingModeEnum.d.ts +6 -0
  87. package/bin/retailCatalog/enums/TrackingModeEnum.js +10 -0
  88. package/bin/retailCatalog/index.d.ts +29 -0
  89. package/bin/retailCatalog/index.js +30 -0
  90. package/bin/retailLoan/dtos/CreateMyPaymentRequest.d.ts +7 -0
  91. package/bin/retailLoan/dtos/CreateMyPaymentRequest.js +30 -0
  92. package/bin/retailLoan/dtos/CreateMyPaymentResponse.d.ts +9 -0
  93. package/bin/retailLoan/dtos/CreateMyPaymentResponse.js +2 -0
  94. package/bin/retailLoan/dtos/MyPaymentOptions.d.ts +34 -0
  95. package/bin/retailLoan/dtos/MyPaymentOptions.js +2 -0
  96. package/bin/retailLoan/enums/MyCollectionOutcomeEnum.d.ts +11 -0
  97. package/bin/retailLoan/enums/MyCollectionOutcomeEnum.js +15 -0
  98. package/bin/retailLoan/enums/MyNextInstallmentModeEnum.d.ts +5 -0
  99. package/bin/retailLoan/enums/MyNextInstallmentModeEnum.js +9 -0
  100. package/bin/retailLoan/enums/MyPaymentTypeEnum.d.ts +6 -0
  101. package/bin/retailLoan/enums/MyPaymentTypeEnum.js +10 -0
  102. package/bin/retailLoan/enums/MyPaymentUnavailableReasonEnum.d.ts +8 -0
  103. package/bin/retailLoan/enums/MyPaymentUnavailableReasonEnum.js +12 -0
  104. package/bin/retailLoan/index.d.ts +7 -0
  105. package/bin/retailLoan/index.js +8 -0
  106. package/bin/retailWizard/dtos/Sale.d.ts +7 -0
  107. package/bin/retailWizard/dtos/SaleLine.d.ts +16 -0
  108. package/bin/retailWizard/dtos/SaleLine.js +2 -0
  109. package/bin/retailWizard/dtos/WizardLineIdentifiers.d.ts +5 -0
  110. package/bin/retailWizard/dtos/WizardLineIdentifiers.js +2 -0
  111. package/bin/retailWizard/dtos/WizardLineProduct.d.ts +15 -0
  112. package/bin/retailWizard/dtos/WizardLineProduct.js +2 -0
  113. package/bin/retailWizard/dtos/WizardProduct.d.ts +6 -0
  114. package/bin/retailWizard/dtos/WizardReservedLine.d.ts +35 -0
  115. package/bin/retailWizard/dtos/WizardReservedLine.js +2 -0
  116. package/bin/retailWizard/dtos/WizardSession.d.ts +5 -0
  117. package/bin/retailWizard/dtos/requests/AddProductRequest.d.ts +4 -8
  118. package/bin/retailWizard/dtos/requests/AddProductRequest.js +9 -8
  119. package/bin/retailWizard/dtos/requests/CompleteSaleRequest.d.ts +16 -0
  120. package/bin/retailWizard/dtos/requests/CompleteSaleRequest.js +59 -0
  121. package/bin/retailWizard/dtos/requests/DeleteProductRequest.d.ts +3 -1
  122. package/bin/retailWizard/dtos/requests/DeleteProductRequest.js +7 -1
  123. package/bin/retailWizard/dtos/requests/QuoteRequest.d.ts +2 -0
  124. package/bin/retailWizard/dtos/requests/QuoteRequest.js +7 -0
  125. package/bin/retailWizard/dtos/requests/SuggestIdentifiersQuery.d.ts +5 -0
  126. package/bin/retailWizard/dtos/requests/SuggestIdentifiersQuery.js +30 -0
  127. package/bin/retailWizard/enums/LinePaymentTypeEnum.d.ts +7 -0
  128. package/bin/retailWizard/enums/LinePaymentTypeEnum.js +11 -0
  129. package/bin/retailWizard/enums/WizardLineStatusEnum.d.ts +9 -0
  130. package/bin/retailWizard/enums/WizardLineStatusEnum.js +13 -0
  131. package/bin/retailWizard/index.d.ts +8 -0
  132. package/bin/retailWizard/index.js +8 -0
  133. package/package.json +1 -1
  134. package/src/loanCredit/dtos/requests/CreateCustomerPaymentRequest.ts +21 -0
  135. package/src/loanCredit/dtos/responses/LoanAdHocChargeRequested.ts +3 -0
  136. package/src/loanCredit/dtos/responses/LoanCustomerPaymentOptions.ts +32 -0
  137. package/src/loanCredit/dtos/responses/LoanCustomerPaymentResult.ts +12 -0
  138. package/src/loanCredit/enums/LoanCustomerPaymentTypeEnum.ts +5 -0
  139. package/src/loanCredit/enums/LoanNextInstallmentModeEnum.ts +7 -0
  140. package/src/loanCredit/enums/LoanPaymentOptionUnavailableReasonEnum.ts +13 -0
  141. package/src/loanCredit/index.ts +8 -0
  142. package/src/retailCatalog/dtos/Product.ts +17 -1
  143. package/src/retailCatalog/dtos/ProductComponent.ts +14 -0
  144. package/src/retailCatalog/dtos/requests/GetInventorySkuQuery.ts +27 -0
  145. package/src/retailCatalog/dtos/requests/InventoryLensQuery.ts +12 -1
  146. package/src/retailCatalog/dtos/requests/ReleaseStockRequest.ts +19 -0
  147. package/src/retailCatalog/dtos/requests/RenewReservationsRequest.ts +15 -0
  148. package/src/retailCatalog/dtos/requests/ReservationLineRef.ts +10 -0
  149. package/src/retailCatalog/dtos/requests/ReserveStockRequest.ts +24 -0
  150. package/src/retailCatalog/dtos/requests/ReturnStockRequest.ts +22 -0
  151. package/src/retailCatalog/dtos/requests/SellStockRequest.ts +18 -0
  152. package/src/retailCatalog/dtos/requests/StockLine.ts +36 -0
  153. package/src/retailCatalog/dtos/requests/SuggestPiecesQuery.ts +11 -0
  154. package/src/retailCatalog/dtos/requests/SyncInventoryRequest.ts +145 -0
  155. package/src/retailCatalog/dtos/responses/GetInventorySkuResponse.ts +38 -0
  156. package/src/retailCatalog/dtos/responses/InventoryLensResponse.ts +48 -2
  157. package/src/retailCatalog/dtos/responses/ListSkuPricesResponse.ts +7 -0
  158. package/src/retailCatalog/dtos/responses/ReleaseStockResponse.ts +11 -0
  159. package/src/retailCatalog/dtos/responses/RenewReservationsResponse.ts +11 -0
  160. package/src/retailCatalog/dtos/responses/ReserveStockResponse.ts +27 -0
  161. package/src/retailCatalog/dtos/responses/ReturnStockResponse.ts +4 -0
  162. package/src/retailCatalog/dtos/responses/SellStockResponse.ts +20 -0
  163. package/src/retailCatalog/dtos/responses/SkuPriceEntry.ts +10 -0
  164. package/src/retailCatalog/dtos/responses/StoreCatalogItem.ts +31 -0
  165. package/src/retailCatalog/dtos/responses/SuggestPiecesResponse.ts +7 -0
  166. package/src/retailCatalog/dtos/responses/SyncInventoryResponse.ts +15 -0
  167. package/src/retailCatalog/dtos/validation/ValidateProductResponse.ts +6 -1
  168. package/src/retailCatalog/enums/InventoryLensFilterEnum.ts +2 -0
  169. package/src/retailCatalog/enums/InventoryLensPeriodEnum.ts +7 -0
  170. package/src/retailCatalog/enums/InventoryMovementTypeEnum.ts +9 -0
  171. package/src/retailCatalog/enums/InventorySyncRejectionCodeEnum.ts +9 -0
  172. package/src/retailCatalog/enums/InventorySyncResultStatusEnum.ts +6 -0
  173. package/src/retailCatalog/enums/PriceSourceEnum.ts +4 -0
  174. package/src/retailCatalog/enums/ProductCategoryEnum.ts +9 -0
  175. package/src/retailCatalog/enums/TrackingModeEnum.ts +6 -0
  176. package/src/retailCatalog/index.ts +31 -0
  177. package/src/retailLoan/dtos/CreateMyPaymentRequest.ts +16 -0
  178. package/src/retailLoan/dtos/CreateMyPaymentResponse.ts +10 -0
  179. package/src/retailLoan/dtos/MyPaymentOptions.ts +28 -0
  180. package/src/retailLoan/enums/MyCollectionOutcomeEnum.ts +11 -0
  181. package/src/retailLoan/enums/MyNextInstallmentModeEnum.ts +5 -0
  182. package/src/retailLoan/enums/MyPaymentTypeEnum.ts +6 -0
  183. package/src/retailLoan/enums/MyPaymentUnavailableReasonEnum.ts +8 -0
  184. package/src/retailLoan/index.ts +9 -0
  185. package/src/retailWizard/dtos/Sale.ts +7 -0
  186. package/src/retailWizard/dtos/SaleLine.ts +17 -0
  187. package/src/retailWizard/dtos/WizardLineIdentifiers.ts +5 -0
  188. package/src/retailWizard/dtos/WizardLineProduct.ts +16 -0
  189. package/src/retailWizard/dtos/WizardProduct.ts +7 -0
  190. package/src/retailWizard/dtos/WizardReservedLine.ts +36 -0
  191. package/src/retailWizard/dtos/WizardSession.ts +5 -0
  192. package/src/retailWizard/dtos/requests/AddProductRequest.ts +9 -8
  193. package/src/retailWizard/dtos/requests/CompleteSaleRequest.ts +41 -0
  194. package/src/retailWizard/dtos/requests/DeleteProductRequest.ts +7 -1
  195. package/src/retailWizard/dtos/requests/QuoteRequest.ts +8 -1
  196. package/src/retailWizard/dtos/requests/SuggestIdentifiersQuery.ts +15 -0
  197. package/src/retailWizard/enums/LinePaymentTypeEnum.ts +7 -0
  198. package/src/retailWizard/enums/WizardLineStatusEnum.ts +9 -0
  199. package/src/retailWizard/index.ts +8 -0
@@ -0,0 +1,5 @@
1
+ /** Identificadores (IMEI o serie) capturados para un SKU de la línea; un producto suelto es un solo SKU. */
2
+ export interface WizardLineIdentifiers {
3
+ sku: string;
4
+ identifiers: string[];
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import type { ProductCategoryEnum } from '../../retailCatalog/enums/ProductCategoryEnum';
2
+ import type { ProductTierEnum } from '../../retailCatalog/enums/ProductTierEnum';
3
+ import type { TrackingModeEnum } from '../../retailCatalog/enums/TrackingModeEnum';
4
+ /** Ficha comercial de una línea, congelada al reservar para pintarla sin volver al catálogo. */
5
+ export interface WizardLineProduct {
6
+ brand: string;
7
+ model: string;
8
+ capacity: string | null;
9
+ color: string | null;
10
+ imageUrl: string | null;
11
+ /** `null` = Sin gama. */
12
+ tier: ProductTierEnum | null;
13
+ category: ProductCategoryEnum;
14
+ trackingMode: TrackingModeEnum;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,5 @@
1
+ import type { ProductCategoryEnum } from '../../retailCatalog/enums/ProductCategoryEnum';
2
+ import type { TrackingModeEnum } from '../../retailCatalog/enums/TrackingModeEnum';
1
3
  /**
2
4
  * Ficha COMERCIAL del equipo reservado, congelada en la sesión al momento de reservarlo (S03).
3
5
  *
@@ -38,4 +40,8 @@ export interface WizardProduct {
38
40
  * Mismo nombre que en `retail-catalog`: es su dato, no se renombra al cruzar la frontera.
39
41
  */
40
42
  eligibleFinanciers: string[];
43
+ /** Línea de `reservedLines` que espeja esta ficha. */
44
+ lineId?: string;
45
+ category?: ProductCategoryEnum;
46
+ trackingMode?: TrackingModeEnum;
41
47
  }
@@ -0,0 +1,35 @@
1
+ import type { MdmProviderEnum } from '../../retailCatalog/enums/MdmProviderEnum';
2
+ import type { ReservedComponent } from '../../retailCatalog/dtos/responses/ReserveStockResponse';
3
+ import type { LinePaymentTypeEnum } from '../enums/LinePaymentTypeEnum';
4
+ import type { WizardLineStatusEnum } from '../enums/WizardLineStatusEnum';
5
+ import type { WizardLineIdentifiers } from './WizardLineIdentifiers';
6
+ import type { WizardLineProduct } from './WizardLineProduct';
7
+ /** Línea de la venta en curso; los campos de precio son `null` mientras la línea está PENDING. */
8
+ export interface WizardReservedLine {
9
+ lineId: string;
10
+ sku: string;
11
+ qty: number;
12
+ status: WizardLineStatusEnum;
13
+ /** Llave de idempotencia de la reserva; una nueva por cada intento. */
14
+ reservationId: string;
15
+ /** Vencimiento de la reserva; una línea PENDING nace con ahora + 30 min. */
16
+ expiresAt: string;
17
+ /** Precio fijado de la línea (el del kit si es kit). */
18
+ basePriceCents: number | null;
19
+ listPriceCents: number | null;
20
+ /** Llave del registro PRICE# del que salió el precio. */
21
+ priceSk: string | null;
22
+ eligibleFinanciers: string[];
23
+ /** SureKeep está en `eligibleFinanciers`. */
24
+ financeable: boolean;
25
+ /** `null` mientras no se decide qué línea se financia. */
26
+ paymentType: LinePaymentTypeEnum | null;
27
+ /** Ítems que la línea suma al tope de 100 de la venta. */
28
+ sellItemCost: number | null;
29
+ mdmEnabled?: boolean;
30
+ mdmProvider?: MdmProviderEnum | null;
31
+ /** Solo si la línea es un kit. */
32
+ components?: ReservedComponent[];
33
+ identifiers?: WizardLineIdentifiers[];
34
+ product?: WizardLineProduct | null;
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,6 +9,7 @@ import type { WizardConsents } from './WizardConsents';
9
9
  import type { WizardLoan } from './WizardLoan';
10
10
  import type { WizardPayment } from './WizardPayment';
11
11
  import type { WizardProduct } from './WizardProduct';
12
+ import type { WizardReservedLine } from './WizardReservedLine';
12
13
  import type { WizardResumeTarget } from './WizardResumeTarget';
13
14
  import type { WizardWelcome } from './WizardWelcome';
14
15
  /** Modalidad de captura del KYC (M1 §213-329). */
@@ -108,6 +109,10 @@ export interface WizardSession {
108
109
  */
109
110
  product: WizardProduct | null;
110
111
  reservationExpiresAt: string | null;
112
+ /** Líneas de la venta; `reservedSku`, `reservedImei` y `product` espejan la financiada o la principal. */
113
+ reservedLines?: WizardReservedLine[];
114
+ /** Línea elegida para financiar; `null` si la venta es de contado o aún no se elige. */
115
+ financedLineId?: string | null;
111
116
  paymentMethod: PaymentMethodEnum | null;
112
117
  externalProvider: ExternalProviderEnum | null;
113
118
  /** Folio de cobro server-side (D11), idempotente, sobrevive al volver atrás. */
@@ -1,15 +1,11 @@
1
1
  /**
2
- * POST /wizard/sessions/:id/product — reserva un equipo del catálogo (paso 03). Reserva 30 min en
3
- * RetailInventory F1 (condición atómica H2).
4
- *
5
- * `imei` y `cashPriceCents` son OPCIONALES a propósito: la unidad física y el precio son AUTORIDAD DEL
6
- * SERVIDOR. Con solo el `sku`, el wizard elige una unidad disponible del catálogo y toma su precio (el
7
- * cliente NUNCA dicta el monto a cobrar — `cashPriceCents` ancla el cobro con `amountCents == cashPrice`).
8
- * Si el caller manda `imei`, el server puede honrar esa unidad, pero el precio SIEMPRE sale del catálogo.
9
- * SureKeep Fase 2 — pista Retail.
2
+ * POST /wizard/sessions/:id/product — agrega una línea a la venta y reserva sus piezas en el catálogo.
3
+ * `imei` y `cashPriceCents` son opcionales: la pieza y el precio los decide el servidor.
10
4
  */
11
5
  export declare class AddProductRequest {
12
6
  sku: string;
13
7
  imei?: string;
14
8
  cashPriceCents?: number;
9
+ /** Piezas de la línea; ausente = 1. */
10
+ qty?: number;
15
11
  }
@@ -13,14 +13,8 @@ exports.AddProductRequest = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
15
  /**
16
- * POST /wizard/sessions/:id/product — reserva un equipo del catálogo (paso 03). Reserva 30 min en
17
- * RetailInventory F1 (condición atómica H2).
18
- *
19
- * `imei` y `cashPriceCents` son OPCIONALES a propósito: la unidad física y el precio son AUTORIDAD DEL
20
- * SERVIDOR. Con solo el `sku`, el wizard elige una unidad disponible del catálogo y toma su precio (el
21
- * cliente NUNCA dicta el monto a cobrar — `cashPriceCents` ancla el cobro con `amountCents == cashPrice`).
22
- * Si el caller manda `imei`, el server puede honrar esa unidad, pero el precio SIEMPRE sale del catálogo.
23
- * SureKeep Fase 2 — pista Retail.
16
+ * POST /wizard/sessions/:id/product — agrega una línea a la venta y reserva sus piezas en el catálogo.
17
+ * `imei` y `cashPriceCents` son opcionales: la pieza y el precio los decide el servidor.
24
18
  */
25
19
  class AddProductRequest {
26
20
  }
@@ -43,3 +37,10 @@ __decorate([
43
37
  (0, class_validator_1.Min)(0),
44
38
  __metadata("design:type", Number)
45
39
  ], AddProductRequest.prototype, "cashPriceCents", void 0);
40
+ __decorate([
41
+ (0, class_transformer_1.Expose)(),
42
+ (0, class_validator_1.IsOptional)(),
43
+ (0, class_validator_1.IsInt)(),
44
+ (0, class_validator_1.Min)(1),
45
+ __metadata("design:type", Number)
46
+ ], AddProductRequest.prototype, "qty", void 0);
@@ -0,0 +1,16 @@
1
+ /** Identificadores capturados en la entrega para un SKU de la línea (componente si es kit). */
2
+ export declare class CompleteSaleLineComponent {
3
+ sku: string;
4
+ /** Vacío si el SKU se rastrea por cantidad. */
5
+ identifiers: string[];
6
+ }
7
+ /** Línea de la sesión con los identificadores de sus piezas. */
8
+ export declare class CompleteSaleLine {
9
+ lineId: string;
10
+ components: CompleteSaleLineComponent[];
11
+ }
12
+ /** POST /wizard/sessions/:id/complete-sale — cierra la venta con los identificadores de cada línea. */
13
+ export declare class CompleteSaleRequest {
14
+ /** Opcional: el front previo cierra sin body; el wizard exige los identificadores que falten. */
15
+ lines?: CompleteSaleLine[];
16
+ }
@@ -0,0 +1,59 @@
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.CompleteSaleRequest = exports.CompleteSaleLine = exports.CompleteSaleLineComponent = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /** Identificadores capturados en la entrega para un SKU de la línea (componente si es kit). */
16
+ class CompleteSaleLineComponent {
17
+ }
18
+ exports.CompleteSaleLineComponent = CompleteSaleLineComponent;
19
+ __decorate([
20
+ (0, class_transformer_1.Expose)(),
21
+ (0, class_validator_1.IsString)(),
22
+ (0, class_validator_1.MinLength)(1),
23
+ __metadata("design:type", String)
24
+ ], CompleteSaleLineComponent.prototype, "sku", void 0);
25
+ __decorate([
26
+ (0, class_transformer_1.Expose)(),
27
+ (0, class_validator_1.IsArray)(),
28
+ (0, class_validator_1.IsString)({ each: true }),
29
+ __metadata("design:type", Array)
30
+ ], CompleteSaleLineComponent.prototype, "identifiers", void 0);
31
+ /** Línea de la sesión con los identificadores de sus piezas. */
32
+ class CompleteSaleLine {
33
+ }
34
+ exports.CompleteSaleLine = CompleteSaleLine;
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)(),
37
+ (0, class_validator_1.IsString)(),
38
+ (0, class_validator_1.MinLength)(1),
39
+ __metadata("design:type", String)
40
+ ], CompleteSaleLine.prototype, "lineId", void 0);
41
+ __decorate([
42
+ (0, class_transformer_1.Expose)(),
43
+ (0, class_validator_1.IsArray)(),
44
+ (0, class_validator_1.ValidateNested)({ each: true }),
45
+ (0, class_transformer_1.Type)(() => CompleteSaleLineComponent),
46
+ __metadata("design:type", Array)
47
+ ], CompleteSaleLine.prototype, "components", void 0);
48
+ /** POST /wizard/sessions/:id/complete-sale — cierra la venta con los identificadores de cada línea. */
49
+ class CompleteSaleRequest {
50
+ }
51
+ exports.CompleteSaleRequest = CompleteSaleRequest;
52
+ __decorate([
53
+ (0, class_transformer_1.Expose)(),
54
+ (0, class_validator_1.IsOptional)(),
55
+ (0, class_validator_1.IsArray)(),
56
+ (0, class_validator_1.ValidateNested)({ each: true }),
57
+ (0, class_transformer_1.Type)(() => CompleteSaleLine),
58
+ __metadata("design:type", Array)
59
+ ], CompleteSaleRequest.prototype, "lines", void 0);
@@ -1,5 +1,7 @@
1
- /** DELETE /wizard/sessions/:id/product — libera la reserva del equipo (vuelve al catálogo). SureKeep Fase 2 — pista Retail. */
1
+ /** DELETE /wizard/sessions/:id/product — quita una línea de la venta y libera su reserva en el catálogo. */
2
2
  export declare class DeleteProductRequest {
3
3
  /** Opcional a propósito: exigirlo rompe a los callers que liberan la reserva sin mandar el imei. */
4
4
  imei?: string;
5
+ /** Línea a quitar de la venta. */
6
+ lineId?: string;
5
7
  }
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.DeleteProductRequest = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
- /** DELETE /wizard/sessions/:id/product — libera la reserva del equipo (vuelve al catálogo). SureKeep Fase 2 — pista Retail. */
15
+ /** DELETE /wizard/sessions/:id/product — quita una línea de la venta y libera su reserva en el catálogo. */
16
16
  class DeleteProductRequest {
17
17
  }
18
18
  exports.DeleteProductRequest = DeleteProductRequest;
@@ -22,3 +22,9 @@ __decorate([
22
22
  (0, class_validator_1.IsString)(),
23
23
  __metadata("design:type", String)
24
24
  ], DeleteProductRequest.prototype, "imei", void 0);
25
+ __decorate([
26
+ (0, class_transformer_1.Expose)(),
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, class_validator_1.IsString)(),
29
+ __metadata("design:type", String)
30
+ ], DeleteProductRequest.prototype, "lineId", void 0);
@@ -8,4 +8,6 @@
8
8
  export declare class QuoteRequest {
9
9
  downPaymentCents: number;
10
10
  termWeeks: number;
11
+ /** Línea que se financia; su precio fijado es el del crédito. */
12
+ financedLineId?: string;
11
13
  }
@@ -34,3 +34,10 @@ __decorate([
34
34
  (0, class_validator_1.Min)(1),
35
35
  __metadata("design:type", Number)
36
36
  ], QuoteRequest.prototype, "termWeeks", void 0);
37
+ __decorate([
38
+ (0, class_transformer_1.Expose)(),
39
+ (0, class_validator_1.IsOptional)(),
40
+ (0, class_validator_1.IsString)(),
41
+ (0, class_validator_1.MinLength)(1),
42
+ __metadata("design:type", String)
43
+ ], QuoteRequest.prototype, "financedLineId", void 0);
@@ -0,0 +1,5 @@
1
+ /** Query de GET /wizard/sessions/:id/lines/:lineId/identifiers; sku es el componente si la línea es kit. */
2
+ export declare class SuggestIdentifiersQuery {
3
+ sku: string;
4
+ prefix: string;
5
+ }
@@ -0,0 +1,30 @@
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.SuggestIdentifiersQuery = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /** Query de GET /wizard/sessions/:id/lines/:lineId/identifiers; sku es el componente si la línea es kit. */
16
+ class SuggestIdentifiersQuery {
17
+ }
18
+ exports.SuggestIdentifiersQuery = SuggestIdentifiersQuery;
19
+ __decorate([
20
+ (0, class_transformer_1.Expose)(),
21
+ (0, class_validator_1.IsString)(),
22
+ (0, class_validator_1.MinLength)(1),
23
+ __metadata("design:type", String)
24
+ ], SuggestIdentifiersQuery.prototype, "sku", void 0);
25
+ __decorate([
26
+ (0, class_transformer_1.Expose)(),
27
+ (0, class_validator_1.IsString)(),
28
+ (0, class_validator_1.MinLength)(4),
29
+ __metadata("design:type", String)
30
+ ], SuggestIdentifiersQuery.prototype, "prefix", void 0);
@@ -0,0 +1,7 @@
1
+ /** Forma de pago de una línea de la venta. */
2
+ export declare enum LinePaymentTypeEnum {
3
+ /** Financiada con crédito SureKeep. */
4
+ CREDIT = "CREDIT",
5
+ /** De contado (o con tarjeta), junto con el enganche. */
6
+ CASH = "CASH"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LinePaymentTypeEnum = void 0;
4
+ /** Forma de pago de una línea de la venta. */
5
+ var LinePaymentTypeEnum;
6
+ (function (LinePaymentTypeEnum) {
7
+ /** Financiada con crédito SureKeep. */
8
+ LinePaymentTypeEnum["CREDIT"] = "CREDIT";
9
+ /** De contado (o con tarjeta), junto con el enganche. */
10
+ LinePaymentTypeEnum["CASH"] = "CASH";
11
+ })(LinePaymentTypeEnum || (exports.LinePaymentTypeEnum = LinePaymentTypeEnum = {}));
@@ -0,0 +1,9 @@
1
+ /** Estado de una línea reservada de la sesión. */
2
+ export declare enum WizardLineStatusEnum {
3
+ /** Escrita con su reservationId, antes de que el catálogo confirme la reserva. */
4
+ PENDING = "PENDING",
5
+ /** El catálogo confirmó la reserva y fijó precio. */
6
+ RESERVED = "RESERVED",
7
+ /** Marcada para liberar; pago y enganche la rechazan. */
8
+ RELEASING = "RELEASING"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WizardLineStatusEnum = void 0;
4
+ /** Estado de una línea reservada de la sesión. */
5
+ var WizardLineStatusEnum;
6
+ (function (WizardLineStatusEnum) {
7
+ /** Escrita con su reservationId, antes de que el catálogo confirme la reserva. */
8
+ WizardLineStatusEnum["PENDING"] = "PENDING";
9
+ /** El catálogo confirmó la reserva y fijó precio. */
10
+ WizardLineStatusEnum["RESERVED"] = "RESERVED";
11
+ /** Marcada para liberar; pago y enganche la rechazan. */
12
+ WizardLineStatusEnum["RELEASING"] = "RELEASING";
13
+ })(WizardLineStatusEnum || (exports.WizardLineStatusEnum = WizardLineStatusEnum = {}));
@@ -21,6 +21,8 @@ export * from './enums/AppOnboardingStepEnum';
21
21
  export * from './enums/AppOnboardingStepStatusEnum';
22
22
  export * from './enums/BlockedReasonEnum';
23
23
  export * from './enums/BlockedCategoryEnum';
24
+ export * from './enums/WizardLineStatusEnum';
25
+ export * from './enums/LinePaymentTypeEnum';
24
26
  export * from './dtos/WizardConsents';
25
27
  export * from './dtos/WizardPayment';
26
28
  export * from './dtos/WizardProduct';
@@ -34,6 +36,10 @@ export * from './dtos/AccountStep';
34
36
  export * from './dtos/AppOnboardingStep';
35
37
  export * from './dtos/WizardResumeTarget';
36
38
  export * from './dtos/WizardBlocked';
39
+ export * from './dtos/WizardLineProduct';
40
+ export * from './dtos/WizardLineIdentifiers';
41
+ export * from './dtos/WizardReservedLine';
42
+ export * from './dtos/SaleLine';
37
43
  export * from './dtos/WizardSession';
38
44
  export * from './dtos/OtpVerification';
39
45
  export * from './dtos/Sale';
@@ -69,6 +75,8 @@ export * from './dtos/requests/QuoteRequest';
69
75
  export * from './dtos/requests/DownPaymentRequest';
70
76
  export * from './dtos/requests/SignatureSignRequest';
71
77
  export * from './dtos/requests/RegisterDeviceRequest';
78
+ export * from './dtos/requests/CompleteSaleRequest';
79
+ export * from './dtos/requests/SuggestIdentifiersQuery';
72
80
  export * from './dtos/responses/KycPrepareResponse';
73
81
  export * from './dtos/responses/ProofOfAddressPrepareResponse';
74
82
  export * from './dtos/responses/SessionFinanciersResponse';
@@ -39,6 +39,8 @@ __exportStar(require("./enums/AppOnboardingStepEnum"), exports);
39
39
  __exportStar(require("./enums/AppOnboardingStepStatusEnum"), exports);
40
40
  __exportStar(require("./enums/BlockedReasonEnum"), exports);
41
41
  __exportStar(require("./enums/BlockedCategoryEnum"), exports);
42
+ __exportStar(require("./enums/WizardLineStatusEnum"), exports);
43
+ __exportStar(require("./enums/LinePaymentTypeEnum"), exports);
42
44
  // DTOs anidados
43
45
  __exportStar(require("./dtos/WizardConsents"), exports);
44
46
  __exportStar(require("./dtos/WizardPayment"), exports);
@@ -53,6 +55,10 @@ __exportStar(require("./dtos/AccountStep"), exports);
53
55
  __exportStar(require("./dtos/AppOnboardingStep"), exports);
54
56
  __exportStar(require("./dtos/WizardResumeTarget"), exports);
55
57
  __exportStar(require("./dtos/WizardBlocked"), exports);
58
+ __exportStar(require("./dtos/WizardLineProduct"), exports);
59
+ __exportStar(require("./dtos/WizardLineIdentifiers"), exports);
60
+ __exportStar(require("./dtos/WizardReservedLine"), exports);
61
+ __exportStar(require("./dtos/SaleLine"), exports);
56
62
  // Entidades principales (shapes de estado/persistencia — planas)
57
63
  __exportStar(require("./dtos/WizardSession"), exports);
58
64
  __exportStar(require("./dtos/OtpVerification"), exports);
@@ -91,6 +97,8 @@ __exportStar(require("./dtos/requests/QuoteRequest"), exports);
91
97
  __exportStar(require("./dtos/requests/DownPaymentRequest"), exports);
92
98
  __exportStar(require("./dtos/requests/SignatureSignRequest"), exports);
93
99
  __exportStar(require("./dtos/requests/RegisterDeviceRequest"), exports);
100
+ __exportStar(require("./dtos/requests/CompleteSaleRequest"), exports);
101
+ __exportStar(require("./dtos/requests/SuggestIdentifiersQuery"), exports);
94
102
  // Response DTOs (output tipado por endpoint)
95
103
  __exportStar(require("./dtos/responses/KycPrepareResponse"), exports);
96
104
  __exportStar(require("./dtos/responses/ProofOfAddressPrepareResponse"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.460.0",
3
+ "version": "3.462.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -0,0 +1,21 @@
1
+ import { Expose } from 'class-transformer';
2
+ import { IsEnum, IsInt, IsUUID, Min } from 'class-validator';
3
+ import { LoanCustomerPaymentTypeEnum } from '../../enums/LoanCustomerPaymentTypeEnum';
4
+
5
+ /** Body de `POST /private/customers/:directoryId/credits/:creditId/payments` (loan-credit-business). */
6
+ export class CreateCustomerPaymentRequest {
7
+ @Expose()
8
+ @IsEnum(LoanCustomerPaymentTypeEnum)
9
+ type!: LoanCustomerPaymentTypeEnum;
10
+
11
+ /** Monto que vio el cliente; si ya no coincide, responde 409 CUSTOMER_PAYMENT_AMOUNT_CHANGED. */
12
+ @Expose()
13
+ @IsInt()
14
+ @Min(1)
15
+ expectedAmountCents!: number;
16
+
17
+ /** Llave del reintento: la misma llave con el mismo cuerpo devuelve la misma respuesta. */
18
+ @Expose()
19
+ @IsUUID()
20
+ idempotencyKey!: string;
21
+ }
@@ -1,3 +1,4 @@
1
+ import { CollectionResultStatus } from '../../../collection/enums/CollectionResultStatus';
1
2
  import { LoanAdHocChargeKindEnum } from '../../enums/LoanAdHocChargeKindEnum';
2
3
 
3
4
  /** Response 202 de recovery-collection, prepayments y advances. El 202 no mueve el libro; lo mueve el apply-result. */
@@ -7,4 +8,6 @@ export interface LoanAdHocChargeRequested {
7
8
  /** `<creditId>#<chargeKind>#<n>`. */
8
9
  chargeId: string;
9
10
  amountCents: number;
11
+ /** Respuesta síncrona del motor; ausente si no contestó a tiempo. */
12
+ collection?: { status: CollectionResultStatus; amountCollectedCents: number };
10
13
  }
@@ -0,0 +1,32 @@
1
+ import { LoanAdHocChargeKindEnum } from '../../enums/LoanAdHocChargeKindEnum';
2
+ import { LoanNextInstallmentModeEnum } from '../../enums/LoanNextInstallmentModeEnum';
3
+ import { LoanPaymentOptionUnavailableReasonEnum } from '../../enums/LoanPaymentOptionUnavailableReasonEnum';
4
+ import { LoanSettlementQuote } from './LoanSettlementQuote';
5
+
6
+ /** Una opción de pago. `amountCents` solo viene si está disponible. */
7
+ export interface LoanCustomerPaymentOption {
8
+ available: boolean;
9
+ unavailableReason?: LoanPaymentOptionUnavailableReasonEnum;
10
+ amountCents?: number;
11
+ }
12
+
13
+ /** Response de `GET /private/customers/:directoryId/credits/:creditId/payment-options`. Montos en cents. */
14
+ export interface LoanCustomerPaymentOptions {
15
+ creditId: string;
16
+ /** Cargo ad hoc en curso; mientras exista, ninguna opción está disponible. */
17
+ pendingCharge?: { kind: LoanAdHocChargeKindEnum; amountCents: number };
18
+ nextInstallment: LoanCustomerPaymentOption & {
19
+ mode?: LoanNextInstallmentModeEnum;
20
+ installmentNumber?: number;
21
+ /** `YYYY-MM-DD`. */
22
+ dueDate?: string;
23
+ };
24
+ /** Varias cuotas: hoy siempre `available: false` con `NOT_AVAILABLE_YET`. */
25
+ advance: LoanCustomerPaymentOption;
26
+ settlement: LoanCustomerPaymentOption & {
27
+ /** La cotización de hoy; su `settlementAmountCents` es el `amountCents`. */
28
+ quote?: LoanSettlementQuote;
29
+ /** Lo que deben las cuotas abiertas menos `settlementAmountCents`. */
30
+ savingsCents?: number;
31
+ };
32
+ }
@@ -0,0 +1,12 @@
1
+ import { CollectionResultStatus } from '../../../collection/enums/CollectionResultStatus';
2
+ import { LoanCustomerPaymentTypeEnum } from '../../enums/LoanCustomerPaymentTypeEnum';
3
+
4
+ /** Response 202 de `POST /private/customers/:directoryId/credits/:creditId/payments`. */
5
+ export interface LoanCustomerPaymentResult {
6
+ creditId: string;
7
+ type: LoanCustomerPaymentTypeEnum;
8
+ chargeId: string;
9
+ amountCents: number;
10
+ /** Respuesta síncrona del motor; ausente si no contestó a tiempo. */
11
+ collection?: { status: CollectionResultStatus; amountCollectedCents: number };
12
+ }
@@ -0,0 +1,5 @@
1
+ /** Pago que el cliente puede pedir desde la app. */
2
+ export enum LoanCustomerPaymentTypeEnum {
3
+ NEXT_INSTALLMENT = 'NEXT_INSTALLMENT',
4
+ SETTLEMENT = 'SETTLEMENT',
5
+ }
@@ -0,0 +1,7 @@
1
+ /** Cómo se cobra la siguiente cuota. */
2
+ export enum LoanNextInstallmentModeEnum {
3
+ /** La cuota aún no está registrada en el motor: se adelanta. */
4
+ ADVANCE = 'ADVANCE',
5
+ /** Vence hoy o hay vencidas: se cobra lo exigible. */
6
+ COLLECT_DUE = 'COLLECT_DUE',
7
+ }
@@ -0,0 +1,13 @@
1
+ /** Por qué una opción de pago no está disponible. */
2
+ export enum LoanPaymentOptionUnavailableReasonEnum {
3
+ /** Hay un cargo ad hoc en curso. */
4
+ PAYMENT_IN_PROGRESS = 'PAYMENT_IN_PROGRESS',
5
+ /** El crédito todavía no está activo. */
6
+ CREDIT_NOT_CURRENT = 'CREDIT_NOT_CURRENT',
7
+ /** Adelantar cubriría todo lo abierto: se liquida. */
8
+ USE_SETTLEMENT = 'USE_SETTLEMENT',
9
+ /** La opción aún no está habilitada. */
10
+ NOT_AVAILABLE_YET = 'NOT_AVAILABLE_YET',
11
+ /** SETTLED, WRITTEN_OFF, CANCELLED o DISCARDED. */
12
+ CREDIT_CLOSED = 'CREDIT_CLOSED',
13
+ }
@@ -154,3 +154,11 @@ export * from './dtos/responses/LoanPrepaymentQuote';
154
154
  export * from './dtos/responses/LoanPaymentReviewItem';
155
155
  export * from './dtos/responses/LoanPaymentReviewListResponse';
156
156
  export * from './dtos/responses/LoanPaymentReviewResolution';
157
+
158
+ // Pagos del cliente: contrato privado con retail-loan-business
159
+ export * from './enums/LoanCustomerPaymentTypeEnum';
160
+ export * from './enums/LoanNextInstallmentModeEnum';
161
+ export * from './enums/LoanPaymentOptionUnavailableReasonEnum';
162
+ export * from './dtos/requests/CreateCustomerPaymentRequest';
163
+ export * from './dtos/responses/LoanCustomerPaymentOptions';
164
+ export * from './dtos/responses/LoanCustomerPaymentResult';
@@ -2,6 +2,9 @@ import { MdmLockModeEnum } from '../enums/MdmLockModeEnum';
2
2
  import { MdmProviderEnum } from '../enums/MdmProviderEnum';
3
3
  import { ProductStatusEnum } from '../enums/ProductStatusEnum';
4
4
  import { ProductTierEnum } from '../enums/ProductTierEnum';
5
+ import { ProductCategoryEnum } from '../enums/ProductCategoryEnum';
6
+ import { TrackingModeEnum } from '../enums/TrackingModeEnum';
7
+ import { ProductComponent } from './ProductComponent';
5
8
 
6
9
  /**
7
10
  * Product — aggregate root del catálogo del dominio `retailCatalog`
@@ -20,7 +23,8 @@ export class Product {
20
23
  description!: string;
21
24
  specs!: Record<string, unknown> | null;
22
25
  imageUrl!: string | null;
23
- tier!: ProductTierEnum;
26
+ /** `null` = Sin gama. */
27
+ tier!: ProductTierEnum | null;
24
28
  basePriceCents!: number;
25
29
  listPriceCents!: number | null;
26
30
  eligibleFinanciers!: string[];
@@ -32,4 +36,16 @@ export class Product {
32
36
  updatedBy!: string;
33
37
  createdAt!: string;
34
38
  updatedAt!: string;
39
+
40
+ // Campos del inventario multi-item; opcionales hasta que todo producto pase por la puerta de entrada.
41
+ category?: ProductCategoryEnum;
42
+ trackingMode?: TrackingModeEnum;
43
+ /** Se puede vender suelto (fuera de un kit). */
44
+ sellable?: boolean;
45
+ /** Aparece en el catálogo del flujo de venta. */
46
+ showInSalesFlow?: boolean;
47
+ /** Solo en BUNDLE. */
48
+ components?: ProductComponent[] | null;
49
+ /** Llave del registro PRICE# del que salen basePriceCents y listPriceCents. */
50
+ currentPriceSk?: string | null;
35
51
  }
@@ -0,0 +1,14 @@
1
+ import { IsInt, IsString, Length, Matches, Min } from 'class-validator';
2
+ import { SKU_PATTERN } from '../constants/SkuPattern';
3
+
4
+ /** Componente de un kit (BUNDLE): qué SKU consume y cuántas piezas por kit. */
5
+ export class ProductComponent {
6
+ @Matches(SKU_PATTERN, { message: 'sku admite solo [A-Za-z0-9-]' })
7
+ @Length(1, 64)
8
+ @IsString()
9
+ sku!: string;
10
+
11
+ @IsInt()
12
+ @Min(1)
13
+ qty!: number;
14
+ }