@fiado/type-kit 3.472.0 → 3.474.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/retailCatalog/accessorySubcategory.test.ts +65 -0
- package/_test_/unit/retailCatalog/catalogDebt.test.ts +123 -0
- package/_test_/unit/retailCatalog/catalogEnums.test.ts +2 -2
- package/_test_/unit/retailCatalog/ventaSaga.test.ts +156 -0
- package/_test_/unit/retailPromotions/computeBudgetUsedBps.test.ts +30 -0
- package/_test_/unit/retailPromotions/constants.test.ts +78 -0
- package/_test_/unit/retailPromotions/discountCodeAndWizardRequests.test.ts +97 -0
- package/_test_/unit/retailPromotions/salePromotionRequests.test.ts +159 -0
- package/_test_/unit/retailWizard/promotionM2mRequests.test.ts +197 -0
- package/_test_/unit/retailWizard/ventaSagaMessages.test.ts +186 -0
- package/_test_/unit/retailWizard/ventaSagaRequests.test.ts +59 -0
- package/_test_/unit/retailWizard/ventaSagaShapes.test.ts +99 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +5 -2
- package/bin/retailCatalog/dtos/Product.d.ts +9 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateProductRequest.d.ts +12 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateProductRequest.js +36 -0
- package/bin/retailCatalog/dtos/requests/BackofficeRegisterAdjustmentRequest.d.ts +2 -0
- package/bin/retailCatalog/dtos/requests/BackofficeRegisterAdjustmentRequest.js +6 -0
- package/bin/retailCatalog/dtos/requests/BackofficeUpdateProductRequest.d.ts +12 -0
- package/bin/retailCatalog/dtos/requests/BackofficeUpdateProductRequest.js +36 -0
- package/bin/retailCatalog/dtos/requests/HoldStockRequest.d.ts +12 -0
- package/bin/retailCatalog/dtos/requests/HoldStockRequest.js +50 -0
- package/bin/retailCatalog/dtos/requests/ReserveStockRequest.d.ts +3 -0
- package/bin/retailCatalog/dtos/requests/ReserveStockRequest.js +6 -0
- package/bin/retailCatalog/dtos/requests/SuggestPiecesQuery.d.ts +2 -0
- package/bin/retailCatalog/dtos/requests/SuggestPiecesQuery.js +6 -0
- package/bin/retailCatalog/dtos/responses/GetInventorySkuResponse.d.ts +3 -0
- package/bin/retailCatalog/dtos/responses/HoldStockResponse.d.ts +8 -0
- package/bin/retailCatalog/dtos/responses/HoldStockResponse.js +2 -0
- package/bin/retailCatalog/dtos/responses/StoreCatalogItem.d.ts +8 -1
- package/bin/retailCatalog/enums/AccessorySubcategoryEnum.d.ts +9 -0
- package/bin/retailCatalog/enums/AccessorySubcategoryEnum.js +13 -0
- package/bin/retailCatalog/enums/InventoryInboundMessageTypeEnum.d.ts +5 -0
- package/bin/retailCatalog/enums/InventoryInboundMessageTypeEnum.js +9 -0
- package/bin/retailCatalog/enums/InventoryItemStatusEnum.d.ts +4 -2
- package/bin/retailCatalog/enums/InventoryItemStatusEnum.js +3 -1
- package/bin/retailCatalog/enums/ReservePurposeEnum.d.ts +4 -0
- package/bin/retailCatalog/enums/ReservePurposeEnum.js +8 -0
- package/bin/retailCatalog/events/InventoryInboundMessage.d.ts +4 -0
- package/bin/retailCatalog/events/InventoryInboundMessage.js +2 -0
- package/bin/retailCatalog/events/InventoryReturnMessage.d.ts +12 -0
- package/bin/retailCatalog/events/InventoryReturnMessage.js +42 -0
- package/bin/retailCatalog/events/InventorySaleAppliedMessage.d.ts +12 -0
- package/bin/retailCatalog/events/InventorySaleAppliedMessage.js +42 -0
- package/bin/retailCatalog/index.d.ts +8 -0
- package/bin/retailCatalog/index.js +9 -0
- package/bin/retailPromotions/constants/bonusPreMoney.d.ts +7 -0
- package/bin/retailPromotions/constants/bonusPreMoney.js +21 -0
- package/bin/retailPromotions/constants/retailPromotionsErrorHttpStatus.d.ts +3 -0
- package/bin/retailPromotions/constants/retailPromotionsErrorHttpStatus.js +27 -0
- package/bin/retailPromotions/constants/salePromotionTransitions.d.ts +7 -0
- package/bin/retailPromotions/constants/salePromotionTransitions.js +13 -0
- package/bin/retailPromotions/dtos/DiscountCode.d.ts +35 -0
- package/bin/retailPromotions/dtos/DiscountCode.js +2 -0
- package/bin/retailPromotions/dtos/DiscountValue.d.ts +7 -0
- package/bin/retailPromotions/dtos/DiscountValue.js +2 -0
- package/bin/retailPromotions/dtos/LinePromotionDiscount.d.ts +10 -0
- package/bin/retailPromotions/dtos/LinePromotionDiscount.js +2 -0
- package/bin/retailPromotions/dtos/SalePromotion.d.ts +35 -0
- package/bin/retailPromotions/dtos/SalePromotion.js +2 -0
- package/bin/retailPromotions/dtos/SalePromotionLevers.d.ts +59 -0
- package/bin/retailPromotions/dtos/SalePromotionLevers.js +2 -0
- package/bin/retailPromotions/dtos/SalePromotionLogEntry.d.ts +18 -0
- package/bin/retailPromotions/dtos/SalePromotionLogEntry.js +2 -0
- package/bin/retailPromotions/dtos/requests/ChangeDiscountCodeStatusRequest.d.ts +6 -0
- package/bin/retailPromotions/dtos/requests/ChangeDiscountCodeStatusRequest.js +30 -0
- package/bin/retailPromotions/dtos/requests/ChangeSalePromotionStatusRequest.d.ts +6 -0
- package/bin/retailPromotions/dtos/requests/ChangeSalePromotionStatusRequest.js +30 -0
- package/bin/retailPromotions/dtos/requests/CreateDiscountCodeRequest.d.ts +17 -0
- package/bin/retailPromotions/dtos/requests/CreateDiscountCodeRequest.js +78 -0
- package/bin/retailPromotions/dtos/requests/CreateSalePromotionRequest.d.ts +19 -0
- package/bin/retailPromotions/dtos/requests/CreateSalePromotionRequest.js +83 -0
- package/bin/retailPromotions/dtos/requests/DiscountValueInput.d.ts +8 -0
- package/bin/retailPromotions/dtos/requests/DiscountValueInput.js +36 -0
- package/bin/retailPromotions/dtos/requests/EvaluateSalePromotionsRequest.d.ts +5 -0
- package/bin/retailPromotions/dtos/requests/EvaluateSalePromotionsRequest.js +31 -0
- package/bin/retailPromotions/dtos/requests/GetSaleCouponQuery.d.ts +4 -0
- package/bin/retailPromotions/dtos/requests/GetSaleCouponQuery.js +25 -0
- package/bin/retailPromotions/dtos/requests/HoldSalePromotionRequest.d.ts +11 -0
- package/bin/retailPromotions/dtos/requests/HoldSalePromotionRequest.js +48 -0
- package/bin/retailPromotions/dtos/requests/ListDiscountCodesQuery.d.ts +10 -0
- package/bin/retailPromotions/dtos/requests/ListDiscountCodesQuery.js +49 -0
- package/bin/retailPromotions/dtos/requests/ListSalePromotionLogQuery.d.ts +8 -0
- package/bin/retailPromotions/dtos/requests/ListSalePromotionLogQuery.js +46 -0
- package/bin/retailPromotions/dtos/requests/ListSalePromotionsQuery.d.ts +7 -0
- package/bin/retailPromotions/dtos/requests/ListSalePromotionsQuery.js +40 -0
- package/bin/retailPromotions/dtos/requests/ListStoreSalePromotionsQuery.d.ts +4 -0
- package/bin/retailPromotions/dtos/requests/ListStoreSalePromotionsQuery.js +24 -0
- package/bin/retailPromotions/dtos/requests/SalePromotionLeversInput.d.ts +41 -0
- package/bin/retailPromotions/dtos/requests/SalePromotionLeversInput.js +166 -0
- package/bin/retailPromotions/dtos/requests/SalePromotionScopeInput.d.ts +14 -0
- package/bin/retailPromotions/dtos/requests/SalePromotionScopeInput.js +65 -0
- package/bin/retailPromotions/dtos/requests/UpdateSalePromotionRequest.d.ts +19 -0
- package/bin/retailPromotions/dtos/requests/UpdateSalePromotionRequest.js +85 -0
- package/bin/retailPromotions/dtos/responses/DiscountCodeResponses.d.ts +7 -0
- package/bin/retailPromotions/dtos/responses/DiscountCodeResponses.js +2 -0
- package/bin/retailPromotions/dtos/responses/SalePromotionCrudResponses.d.ts +30 -0
- package/bin/retailPromotions/dtos/responses/SalePromotionCrudResponses.js +2 -0
- package/bin/retailPromotions/dtos/responses/WizardSalePromotionResponses.d.ts +102 -0
- package/bin/retailPromotions/dtos/responses/WizardSalePromotionResponses.js +2 -0
- package/bin/retailPromotions/enums/CouponScopeEnum.d.ts +11 -0
- package/bin/retailPromotions/enums/CouponScopeEnum.js +15 -0
- package/bin/retailPromotions/enums/CouponStatusEnum.d.ts +11 -0
- package/bin/retailPromotions/enums/CouponStatusEnum.js +15 -0
- package/bin/retailPromotions/enums/DiscountCodeOriginEnum.d.ts +8 -0
- package/bin/retailPromotions/enums/DiscountCodeOriginEnum.js +12 -0
- package/bin/retailPromotions/enums/DiscountCodeStatusEnum.d.ts +11 -0
- package/bin/retailPromotions/enums/DiscountCodeStatusEnum.js +15 -0
- package/bin/retailPromotions/enums/DiscountCodeTransitionEnum.d.ts +7 -0
- package/bin/retailPromotions/enums/DiscountCodeTransitionEnum.js +11 -0
- package/bin/retailPromotions/enums/DiscountTypeEnum.d.ts +8 -0
- package/bin/retailPromotions/enums/DiscountTypeEnum.js +12 -0
- package/bin/retailPromotions/enums/EntitlementKindEnum.d.ts +9 -0
- package/bin/retailPromotions/enums/EntitlementKindEnum.js +13 -0
- package/bin/retailPromotions/enums/EntitlementStateEnum.d.ts +13 -0
- package/bin/retailPromotions/enums/EntitlementStateEnum.js +17 -0
- package/bin/retailPromotions/enums/GiftModeEnum.d.ts +8 -0
- package/bin/retailPromotions/enums/GiftModeEnum.js +12 -0
- package/bin/retailPromotions/enums/PromotionAppliesToEnum.d.ts +9 -0
- package/bin/retailPromotions/enums/PromotionAppliesToEnum.js +13 -0
- package/bin/retailPromotions/enums/RetailPromotionsErrorCodeEnum.d.ts +29 -0
- package/bin/retailPromotions/enums/RetailPromotionsErrorCodeEnum.js +33 -0
- package/bin/retailPromotions/enums/SaleCouponAvailabilityEnum.d.ts +10 -0
- package/bin/retailPromotions/enums/SaleCouponAvailabilityEnum.js +14 -0
- package/bin/retailPromotions/enums/SalePromotionLeverEnum.d.ts +13 -0
- package/bin/retailPromotions/enums/SalePromotionLeverEnum.js +17 -0
- package/bin/retailPromotions/enums/SalePromotionLogEventEnum.d.ts +14 -0
- package/bin/retailPromotions/enums/SalePromotionLogEventEnum.js +18 -0
- package/bin/retailPromotions/enums/SalePromotionLogFormatEnum.d.ts +5 -0
- package/bin/retailPromotions/enums/SalePromotionLogFormatEnum.js +9 -0
- package/bin/retailPromotions/enums/SalePromotionPhaseEnum.d.ts +11 -0
- package/bin/retailPromotions/enums/SalePromotionPhaseEnum.js +15 -0
- package/bin/retailPromotions/enums/SalePromotionStatusEnum.d.ts +12 -0
- package/bin/retailPromotions/enums/SalePromotionStatusEnum.js +16 -0
- package/bin/retailPromotions/enums/SalePromotionTransitionEnum.d.ts +13 -0
- package/bin/retailPromotions/enums/SalePromotionTransitionEnum.js +17 -0
- package/bin/retailPromotions/helpers/computeBudgetUsedBps.d.ts +3 -0
- package/bin/retailPromotions/helpers/computeBudgetUsedBps.js +15 -0
- package/bin/retailPromotions/helpers/resolveSalePromotionTransition.d.ts +4 -0
- package/bin/retailPromotions/helpers/resolveSalePromotionTransition.js +9 -0
- package/bin/retailPromotions/index.d.ts +47 -0
- package/bin/retailPromotions/index.js +68 -0
- package/bin/retailWizard/dtos/Sale.d.ts +8 -8
- package/bin/retailWizard/dtos/SaleLine.d.ts +4 -1
- package/bin/retailWizard/dtos/WizardFinancingPreview.d.ts +11 -0
- package/bin/retailWizard/dtos/WizardFinancingPreview.js +2 -0
- package/bin/retailWizard/dtos/WizardGiftLine.d.ts +10 -0
- package/bin/retailWizard/dtos/WizardGiftLine.js +2 -0
- package/bin/retailWizard/dtos/WizardLinePromotionFields.d.ts +15 -0
- package/bin/retailWizard/dtos/WizardLinePromotionFields.js +2 -0
- package/bin/retailWizard/dtos/WizardReservedLine.d.ts +4 -1
- package/bin/retailWizard/dtos/WizardSession.d.ts +10 -0
- package/bin/retailWizard/dtos/requests/AddProductRequest.d.ts +2 -0
- package/bin/retailWizard/dtos/requests/AddProductRequest.js +7 -0
- package/bin/retailWizard/dtos/requests/ApplyLinePromotionRequest.d.ts +14 -0
- package/bin/retailWizard/dtos/requests/ApplyLinePromotionRequest.js +57 -0
- package/bin/retailWizard/dtos/requests/ApplySalePromotionRequest.d.ts +9 -0
- package/bin/retailWizard/dtos/requests/ApplySalePromotionRequest.js +36 -0
- package/bin/retailWizard/dtos/requests/PinSessionPiecesRequest.d.ts +14 -0
- package/bin/retailWizard/dtos/requests/PinSessionPiecesRequest.js +60 -0
- package/bin/retailWizard/dtos/requests/QuoteRequest.d.ts +1 -1
- package/bin/retailWizard/dtos/requests/SetAnchorGiftsRequest.d.ts +14 -0
- package/bin/retailWizard/dtos/requests/SetAnchorGiftsRequest.js +56 -0
- package/bin/retailWizard/dtos/responses/PrivateWizardSessionResponse.d.ts +29 -0
- package/bin/retailWizard/dtos/responses/PrivateWizardSessionResponse.js +2 -0
- package/bin/retailWizard/dtos/responses/SetAnchorGiftsResponse.d.ts +5 -0
- package/bin/retailWizard/dtos/responses/SetAnchorGiftsResponse.js +2 -0
- package/bin/retailWizard/enums/RetailPromotionInboundMessageTypeEnum.d.ts +5 -0
- package/bin/retailWizard/enums/RetailPromotionInboundMessageTypeEnum.js +9 -0
- package/bin/retailWizard/enums/WizardLineRoleEnum.d.ts +4 -0
- package/bin/retailWizard/enums/WizardLineRoleEnum.js +8 -0
- package/bin/retailWizard/events/RetailCommissionInboundMessage.d.ts +19 -0
- package/bin/retailWizard/events/RetailCommissionInboundMessage.js +78 -0
- package/bin/retailWizard/events/RetailPromotionInboundMessage.d.ts +40 -0
- package/bin/retailWizard/events/RetailPromotionInboundMessage.js +162 -0
- package/bin/retailWizard/events/SaleCompletedV1.d.ts +2 -3
- package/bin/retailWizard/index.d.ts +13 -0
- package/bin/retailWizard/index.js +14 -0
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/retailCatalog/dtos/Product.ts +9 -0
- package/src/retailCatalog/dtos/requests/BackofficeCreateProductRequest.ts +36 -1
- package/src/retailCatalog/dtos/requests/BackofficeRegisterAdjustmentRequest.ts +6 -0
- package/src/retailCatalog/dtos/requests/BackofficeUpdateProductRequest.ts +36 -1
- package/src/retailCatalog/dtos/requests/HoldStockRequest.ts +31 -0
- package/src/retailCatalog/dtos/requests/ReserveStockRequest.ts +7 -1
- package/src/retailCatalog/dtos/requests/SuggestPiecesQuery.ts +7 -1
- package/src/retailCatalog/dtos/responses/GetInventorySkuResponse.ts +3 -0
- package/src/retailCatalog/dtos/responses/HoldStockResponse.ts +9 -0
- package/src/retailCatalog/dtos/responses/StoreCatalogItem.ts +9 -1
- package/src/retailCatalog/enums/AccessorySubcategoryEnum.ts +9 -0
- package/src/retailCatalog/enums/InventoryInboundMessageTypeEnum.ts +5 -0
- package/src/retailCatalog/enums/InventoryItemStatusEnum.ts +3 -1
- package/src/retailCatalog/enums/ReservePurposeEnum.ts +4 -0
- package/src/retailCatalog/events/InventoryInboundMessage.ts +5 -0
- package/src/retailCatalog/events/InventoryReturnMessage.ts +26 -0
- package/src/retailCatalog/events/InventorySaleAppliedMessage.ts +26 -0
- package/src/retailCatalog/index.ts +10 -0
- package/src/retailPromotions/constants/bonusPreMoney.ts +19 -0
- package/src/retailPromotions/constants/retailPromotionsErrorHttpStatus.ts +25 -0
- package/src/retailPromotions/constants/salePromotionTransitions.ts +11 -0
- package/src/retailPromotions/dtos/DiscountCode.ts +36 -0
- package/src/retailPromotions/dtos/DiscountValue.ts +8 -0
- package/src/retailPromotions/dtos/LinePromotionDiscount.ts +10 -0
- package/src/retailPromotions/dtos/SalePromotion.ts +36 -0
- package/src/retailPromotions/dtos/SalePromotionLevers.ts +68 -0
- package/src/retailPromotions/dtos/SalePromotionLogEntry.ts +19 -0
- package/src/retailPromotions/dtos/requests/ChangeDiscountCodeStatusRequest.ts +15 -0
- package/src/retailPromotions/dtos/requests/ChangeSalePromotionStatusRequest.ts +15 -0
- package/src/retailPromotions/dtos/requests/CreateDiscountCodeRequest.ts +71 -0
- package/src/retailPromotions/dtos/requests/CreateSalePromotionRequest.ts +73 -0
- package/src/retailPromotions/dtos/requests/DiscountValueInput.ts +21 -0
- package/src/retailPromotions/dtos/requests/EvaluateSalePromotionsRequest.ts +16 -0
- package/src/retailPromotions/dtos/requests/GetSaleCouponQuery.ts +11 -0
- package/src/retailPromotions/dtos/requests/HoldSalePromotionRequest.ts +32 -0
- package/src/retailPromotions/dtos/requests/ListDiscountCodesQuery.ts +33 -0
- package/src/retailPromotions/dtos/requests/ListSalePromotionLogQuery.ts +29 -0
- package/src/retailPromotions/dtos/requests/ListSalePromotionsQuery.ts +24 -0
- package/src/retailPromotions/dtos/requests/ListStoreSalePromotionsQuery.ts +10 -0
- package/src/retailPromotions/dtos/requests/SalePromotionLeversInput.ts +135 -0
- package/src/retailPromotions/dtos/requests/SalePromotionScopeInput.ts +45 -0
- package/src/retailPromotions/dtos/requests/UpdateSalePromotionRequest.ts +74 -0
- package/src/retailPromotions/dtos/responses/DiscountCodeResponses.ts +9 -0
- package/src/retailPromotions/dtos/responses/SalePromotionCrudResponses.ts +35 -0
- package/src/retailPromotions/dtos/responses/WizardSalePromotionResponses.ts +115 -0
- package/src/retailPromotions/enums/CouponScopeEnum.ts +11 -0
- package/src/retailPromotions/enums/CouponStatusEnum.ts +11 -0
- package/src/retailPromotions/enums/DiscountCodeOriginEnum.ts +8 -0
- package/src/retailPromotions/enums/DiscountCodeStatusEnum.ts +11 -0
- package/src/retailPromotions/enums/DiscountCodeTransitionEnum.ts +7 -0
- package/src/retailPromotions/enums/DiscountTypeEnum.ts +8 -0
- package/src/retailPromotions/enums/EntitlementKindEnum.ts +9 -0
- package/src/retailPromotions/enums/EntitlementStateEnum.ts +13 -0
- package/src/retailPromotions/enums/GiftModeEnum.ts +8 -0
- package/src/retailPromotions/enums/PromotionAppliesToEnum.ts +9 -0
- package/src/retailPromotions/enums/RetailPromotionsErrorCodeEnum.ts +29 -0
- package/src/retailPromotions/enums/SaleCouponAvailabilityEnum.ts +10 -0
- package/src/retailPromotions/enums/SalePromotionLeverEnum.ts +13 -0
- package/src/retailPromotions/enums/SalePromotionLogEventEnum.ts +14 -0
- package/src/retailPromotions/enums/SalePromotionLogFormatEnum.ts +5 -0
- package/src/retailPromotions/enums/SalePromotionPhaseEnum.ts +11 -0
- package/src/retailPromotions/enums/SalePromotionStatusEnum.ts +12 -0
- package/src/retailPromotions/enums/SalePromotionTransitionEnum.ts +13 -0
- package/src/retailPromotions/helpers/computeBudgetUsedBps.ts +15 -0
- package/src/retailPromotions/helpers/resolveSalePromotionTransition.ts +12 -0
- package/src/retailPromotions/index.ts +56 -0
- package/src/retailWizard/dtos/Sale.ts +8 -8
- package/src/retailWizard/dtos/SaleLine.ts +4 -1
- package/src/retailWizard/dtos/WizardFinancingPreview.ts +12 -0
- package/src/retailWizard/dtos/WizardGiftLine.ts +11 -0
- package/src/retailWizard/dtos/WizardLinePromotionFields.ts +16 -0
- package/src/retailWizard/dtos/WizardReservedLine.ts +4 -1
- package/src/retailWizard/dtos/WizardSession.ts +10 -0
- package/src/retailWizard/dtos/requests/AddProductRequest.ts +8 -1
- package/src/retailWizard/dtos/requests/ApplyLinePromotionRequest.ts +44 -0
- package/src/retailWizard/dtos/requests/ApplySalePromotionRequest.ts +24 -0
- package/src/retailWizard/dtos/requests/PinSessionPiecesRequest.ts +40 -0
- package/src/retailWizard/dtos/requests/QuoteRequest.ts +1 -1
- package/src/retailWizard/dtos/requests/SetAnchorGiftsRequest.ts +40 -0
- package/src/retailWizard/dtos/responses/PrivateWizardSessionResponse.ts +30 -0
- package/src/retailWizard/dtos/responses/SetAnchorGiftsResponse.ts +6 -0
- package/src/retailWizard/enums/RetailPromotionInboundMessageTypeEnum.ts +5 -0
- package/src/retailWizard/enums/WizardLineRoleEnum.ts +4 -0
- package/src/retailWizard/events/RetailCommissionInboundMessage.ts +54 -0
- package/src/retailWizard/events/RetailPromotionInboundMessage.ts +140 -0
- package/src/retailWizard/events/SaleCompletedV1.ts +2 -3
- package/src/retailWizard/index.ts +15 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import {
|
|
3
|
+
LinePaymentTypeEnum,
|
|
4
|
+
WizardLineRoleEnum,
|
|
5
|
+
WizardLineStatusEnum,
|
|
6
|
+
type Sale,
|
|
7
|
+
type SaleLine,
|
|
8
|
+
type WizardFinancingPreview,
|
|
9
|
+
type WizardLinePromotionFields,
|
|
10
|
+
type WizardReservedLine,
|
|
11
|
+
type WizardSession,
|
|
12
|
+
} from '../../../src/retailWizard';
|
|
13
|
+
|
|
14
|
+
const promoFields: WizardLinePromotionFields = {
|
|
15
|
+
role: WizardLineRoleEnum.GIFT,
|
|
16
|
+
promotionId: 'promo-1',
|
|
17
|
+
promotionVersion: 3,
|
|
18
|
+
linkedLineId: 'L1',
|
|
19
|
+
discountCode: 'VERANO',
|
|
20
|
+
discountCents: 50000,
|
|
21
|
+
originalPriceCents: 35000,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
describe('WizardLineRoleEnum', () => {
|
|
25
|
+
it('solo trae GIFT; sin role es una línea normal', () => {
|
|
26
|
+
expect(Object.values(WizardLineRoleEnum)).toEqual(['GIFT']);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
describe('línea de sesión con reparto y campos de Promociones', () => {
|
|
31
|
+
it('acepta financedCents y los 7 campos opcionales', () => {
|
|
32
|
+
const line: WizardReservedLine = {
|
|
33
|
+
lineId: 'L2',
|
|
34
|
+
sku: 'CASE-1',
|
|
35
|
+
qty: 1,
|
|
36
|
+
status: WizardLineStatusEnum.RESERVED,
|
|
37
|
+
reservationId: 'r-2',
|
|
38
|
+
expiresAt: '2026-09-28T20:30:00.000Z',
|
|
39
|
+
basePriceCents: 0,
|
|
40
|
+
listPriceCents: 35000,
|
|
41
|
+
priceSk: 'p',
|
|
42
|
+
eligibleFinanciers: [],
|
|
43
|
+
financeable: false,
|
|
44
|
+
paymentType: LinePaymentTypeEnum.CASH,
|
|
45
|
+
sellItemCost: 1,
|
|
46
|
+
financedCents: 0,
|
|
47
|
+
...promoFields,
|
|
48
|
+
};
|
|
49
|
+
expect(line.role).toBe('GIFT');
|
|
50
|
+
expect(line.financedCents).toBe(0);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
describe('línea de venta con reparto y campos de Promociones', () => {
|
|
55
|
+
it('acepta financedCents y los 7 campos opcionales', () => {
|
|
56
|
+
const line: SaleLine = {
|
|
57
|
+
lineId: 'L1',
|
|
58
|
+
sku: 'PHONE-1',
|
|
59
|
+
qty: 1,
|
|
60
|
+
basePriceCents: 349900,
|
|
61
|
+
listPriceCents: 349900,
|
|
62
|
+
priceSk: 'p',
|
|
63
|
+
paymentType: LinePaymentTypeEnum.CREDIT,
|
|
64
|
+
components: [{ sku: 'PHONE-1', qty: 1, identifiers: ['356938035643809'] }],
|
|
65
|
+
financedCents: 299900,
|
|
66
|
+
...promoFields,
|
|
67
|
+
role: undefined,
|
|
68
|
+
};
|
|
69
|
+
expect(line.discountCents).toBe(50000);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
describe('sesión de la saga', () => {
|
|
74
|
+
it('acepta piecesHeldAt, financingPreview, promo de venta y refundPendingCents', () => {
|
|
75
|
+
const preview: WizardFinancingPreview = { capCents: 89970, lines: [{ lineId: 'L2', financedCents: 35000 }] };
|
|
76
|
+
const session: Pick<
|
|
77
|
+
WizardSession,
|
|
78
|
+
'piecesHeldAt' | 'financingPreview' | 'salePromotionId' | 'salePromotionVersion' | 'refundPendingCents'
|
|
79
|
+
> = {
|
|
80
|
+
piecesHeldAt: '2026-09-28T20:00:00.000Z',
|
|
81
|
+
financingPreview: preview,
|
|
82
|
+
salePromotionId: null,
|
|
83
|
+
salePromotionVersion: null,
|
|
84
|
+
refundPendingCents: 150000,
|
|
85
|
+
};
|
|
86
|
+
expect(session.financingPreview?.lines[0].financedCents).toBe(35000);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
describe('venta de la saga', () => {
|
|
91
|
+
it('acepta promo de venta e inventoryViaQueue', () => {
|
|
92
|
+
const sale: Pick<Sale, 'salePromotionId' | 'salePromotionVersion' | 'inventoryViaQueue'> = {
|
|
93
|
+
salePromotionId: 'sp-1',
|
|
94
|
+
salePromotionVersion: 2,
|
|
95
|
+
inventoryViaQueue: true,
|
|
96
|
+
};
|
|
97
|
+
expect(sale.inventoryViaQueue).toBe(true);
|
|
98
|
+
});
|
|
99
|
+
});
|
package/bin/index.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export * as RetailCatalog from './retailCatalog';
|
|
|
97
97
|
export * as RetailCards from './retailCards';
|
|
98
98
|
export * as RetailCustomer from './retailCustomer';
|
|
99
99
|
export * as RetailWizard from './retailWizard';
|
|
100
|
+
export * as RetailPromotions from './retailPromotions';
|
|
100
101
|
export * as DatalakeQuery from './datalakeQuery';
|
|
101
102
|
export * as LoanConfig from './loanConfig';
|
|
102
103
|
export * as Shortlink from './shortlink';
|
package/bin/index.js
CHANGED
|
@@ -37,8 +37,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
37
37
|
};
|
|
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
|
-
exports.
|
|
41
|
-
exports.MoneyTransfer = exports.RetailLoan = exports.Membership = exports.WebhookBusiness = exports.PeopleBusiness = exports.UserConfirmations = exports.Collection = exports.Shipping = exports.PhoneSales = exports.Onboarding = exports.Kyc = exports.LoanScoring = exports.LoanCredit = exports.LoanCollectorAssignment = exports.LoanOfferings = exports.Shortlink = exports.LoanConfig = void 0;
|
|
40
|
+
exports.RetailPromotions = 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.WhatsappConnector = 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.MoneyTransfer = exports.RetailLoan = exports.Membership = exports.WebhookBusiness = exports.PeopleBusiness = exports.UserConfirmations = exports.Collection = exports.Shipping = exports.PhoneSales = exports.Onboarding = exports.Kyc = exports.LoanScoring = exports.LoanCredit = exports.LoanCollectorAssignment = exports.LoanOfferings = exports.Shortlink = exports.LoanConfig = exports.DatalakeQuery = void 0;
|
|
42
42
|
exports.Crypto = __importStar(require("./crypto"));
|
|
43
43
|
exports.Account = __importStar(require("./account"));
|
|
44
44
|
exports.MetamapConnector = __importStar(require("./metamapConnector"));
|
|
@@ -163,6 +163,9 @@ exports.RetailCustomer = __importStar(require("./retailCustomer"));
|
|
|
163
163
|
// RetailWizard: DTOs/enums del lambda retail-wizard-business (comp 04 — wizard de venta de contado:
|
|
164
164
|
// saga de sesión, OTP, KYC, venta y prospectos; SureKeep Fase 2 — pista Retail).
|
|
165
165
|
exports.RetailWizard = __importStar(require("./retailWizard"));
|
|
166
|
+
// RetailPromotions: DTOs/enums de retail-promotions-business (promos de venta, códigos de descuento y
|
|
167
|
+
// cupones de VentasLuga). Porcentajes en puntos base, dinero en centavos.
|
|
168
|
+
exports.RetailPromotions = __importStar(require("./retailPromotions"));
|
|
166
169
|
exports.DatalakeQuery = __importStar(require("./datalakeQuery"));
|
|
167
170
|
// LoanConfig: DTOs/enums del lambda loan-config-business (comp 09 — parámetros operativos del SOFOM).
|
|
168
171
|
exports.LoanConfig = __importStar(require("./loanConfig"));
|
|
@@ -3,6 +3,7 @@ import { MdmProviderEnum } from '../enums/MdmProviderEnum';
|
|
|
3
3
|
import { ProductStatusEnum } from '../enums/ProductStatusEnum';
|
|
4
4
|
import { ProductTierEnum } from '../enums/ProductTierEnum';
|
|
5
5
|
import { ProductCategoryEnum } from '../enums/ProductCategoryEnum';
|
|
6
|
+
import { AccessorySubcategoryEnum } from '../enums/AccessorySubcategoryEnum';
|
|
6
7
|
import { TrackingModeEnum } from '../enums/TrackingModeEnum';
|
|
7
8
|
import { ItemTypeEnum } from '../enums/ItemTypeEnum';
|
|
8
9
|
import { ProductComponent } from './ProductComponent';
|
|
@@ -37,6 +38,8 @@ export declare class Product {
|
|
|
37
38
|
createdAt: string;
|
|
38
39
|
updatedAt: string;
|
|
39
40
|
category?: ProductCategoryEnum;
|
|
41
|
+
/** Solo en ACCESSORY. */
|
|
42
|
+
accessorySubcategory?: AccessorySubcategoryEnum;
|
|
40
43
|
trackingMode?: TrackingModeEnum;
|
|
41
44
|
/** Se puede vender suelto (fuera de un kit). */
|
|
42
45
|
sellable?: boolean;
|
|
@@ -48,4 +51,10 @@ export declare class Product {
|
|
|
48
51
|
currentPriceSk?: string | null;
|
|
49
52
|
/** Producto físico o servicio; inmutable tras el alta. Ausente = PRODUCT. */
|
|
50
53
|
itemType?: ItemTypeEnum;
|
|
54
|
+
/** Prioridad de venta 0–100; «Recomendados» ordena por ella. */
|
|
55
|
+
salePriority?: number;
|
|
56
|
+
highlights?: string[];
|
|
57
|
+
warrantyMonths?: number;
|
|
58
|
+
/** Fecha ISO 8601. */
|
|
59
|
+
launchDate?: string;
|
|
51
60
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ProductCategoryEnum } from '../../enums/ProductCategoryEnum';
|
|
2
|
+
import { AccessorySubcategoryEnum } from '../../enums/AccessorySubcategoryEnum';
|
|
2
3
|
import { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
3
4
|
import { TrackingModeEnum } from '../../enums/TrackingModeEnum';
|
|
4
5
|
import { MdmLockModeEnum } from '../../enums/MdmLockModeEnum';
|
|
@@ -8,6 +9,8 @@ export declare class BackofficeCreateProductRequest {
|
|
|
8
9
|
sku: string;
|
|
9
10
|
/** El kit (BUNDLE) se da de alta en backofficeCreateKit. */
|
|
10
11
|
category: ProductCategoryEnum;
|
|
12
|
+
/** Solo en ACCESSORY. */
|
|
13
|
+
accessorySubcategory?: AccessorySubcategoryEnum;
|
|
11
14
|
/** Inmutable tras el alta. */
|
|
12
15
|
trackingMode: TrackingModeEnum;
|
|
13
16
|
sellable: boolean;
|
|
@@ -27,4 +30,13 @@ export declare class BackofficeCreateProductRequest {
|
|
|
27
30
|
mdmEnabled?: boolean;
|
|
28
31
|
mdmProvider?: MdmProviderEnum | null;
|
|
29
32
|
mdmLockMode?: MdmLockModeEnum | null;
|
|
33
|
+
/** Prioridad de venta: 100 sale primero en «Recomendados». */
|
|
34
|
+
salePriority?: number;
|
|
35
|
+
highlights?: string[];
|
|
36
|
+
/** 0 = sin garantía. */
|
|
37
|
+
warrantyMonths?: number;
|
|
38
|
+
/** Fecha ISO 8601. */
|
|
39
|
+
launchDate?: string;
|
|
40
|
+
/** Ficha técnica como mapa clave/valor, igual que Product.specs. */
|
|
41
|
+
specs?: Record<string, unknown>;
|
|
30
42
|
}
|
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const SkuPattern_1 = require("../../constants/SkuPattern");
|
|
15
15
|
const NonBundleCategories_1 = require("../../constants/NonBundleCategories");
|
|
16
16
|
const ProductCategoryEnum_1 = require("../../enums/ProductCategoryEnum");
|
|
17
|
+
const AccessorySubcategoryEnum_1 = require("../../enums/AccessorySubcategoryEnum");
|
|
17
18
|
const ProductTierEnum_1 = require("../../enums/ProductTierEnum");
|
|
18
19
|
const TrackingModeEnum_1 = require("../../enums/TrackingModeEnum");
|
|
19
20
|
const MdmLockModeEnum_1 = require("../../enums/MdmLockModeEnum");
|
|
@@ -33,6 +34,11 @@ __decorate([
|
|
|
33
34
|
(0, class_validator_1.IsIn)(NonBundleCategories_1.NON_BUNDLE_CATEGORIES),
|
|
34
35
|
__metadata("design:type", String)
|
|
35
36
|
], BackofficeCreateProductRequest.prototype, "category", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.IsEnum)(AccessorySubcategoryEnum_1.AccessorySubcategoryEnum),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], BackofficeCreateProductRequest.prototype, "accessorySubcategory", void 0);
|
|
36
42
|
__decorate([
|
|
37
43
|
(0, class_validator_1.IsEnum)(TrackingModeEnum_1.TrackingModeEnum),
|
|
38
44
|
__metadata("design:type", String)
|
|
@@ -115,3 +121,33 @@ __decorate([
|
|
|
115
121
|
(0, class_validator_1.IsEnum)(MdmLockModeEnum_1.MdmLockModeEnum),
|
|
116
122
|
__metadata("design:type", String)
|
|
117
123
|
], BackofficeCreateProductRequest.prototype, "mdmLockMode", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, class_validator_1.IsOptional)(),
|
|
126
|
+
(0, class_validator_1.IsInt)(),
|
|
127
|
+
(0, class_validator_1.Min)(0),
|
|
128
|
+
(0, class_validator_1.Max)(100),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], BackofficeCreateProductRequest.prototype, "salePriority", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, class_validator_1.IsOptional)(),
|
|
133
|
+
(0, class_validator_1.IsArray)(),
|
|
134
|
+
(0, class_validator_1.Matches)(/\S/, { each: true }),
|
|
135
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
136
|
+
__metadata("design:type", Array)
|
|
137
|
+
], BackofficeCreateProductRequest.prototype, "highlights", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, class_validator_1.IsOptional)(),
|
|
140
|
+
(0, class_validator_1.IsInt)(),
|
|
141
|
+
(0, class_validator_1.Min)(0),
|
|
142
|
+
__metadata("design:type", Number)
|
|
143
|
+
], BackofficeCreateProductRequest.prototype, "warrantyMonths", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, class_validator_1.IsOptional)(),
|
|
146
|
+
(0, class_validator_1.IsISO8601)(),
|
|
147
|
+
__metadata("design:type", String)
|
|
148
|
+
], BackofficeCreateProductRequest.prototype, "launchDate", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, class_validator_1.IsOptional)(),
|
|
151
|
+
(0, class_validator_1.IsObject)(),
|
|
152
|
+
__metadata("design:type", Object)
|
|
153
|
+
], BackofficeCreateProductRequest.prototype, "specs", void 0);
|
|
@@ -9,4 +9,6 @@ export declare class BackofficeRegisterAdjustmentRequest {
|
|
|
9
9
|
reason: InventoryMovementReasonEnum;
|
|
10
10
|
/** IMEI o serie de cada pieza; ausente si el SKU se rastrea por cantidad. */
|
|
11
11
|
identifiers?: string[];
|
|
12
|
+
/** movementId del MOV# que este ajuste corrige; el catálogo responde 404 si no existe. */
|
|
13
|
+
reversesMovementId?: string;
|
|
12
14
|
}
|
|
@@ -47,3 +47,9 @@ __decorate([
|
|
|
47
47
|
(0, class_validator_1.IsString)({ each: true }),
|
|
48
48
|
__metadata("design:type", Array)
|
|
49
49
|
], BackofficeRegisterAdjustmentRequest.prototype, "identifiers", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
(0, class_validator_1.Matches)(/^\S+$/),
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], BackofficeRegisterAdjustmentRequest.prototype, "reversesMovementId", void 0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ProductCategoryEnum } from '../../enums/ProductCategoryEnum';
|
|
2
|
+
import { AccessorySubcategoryEnum } from '../../enums/AccessorySubcategoryEnum';
|
|
2
3
|
import { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
3
4
|
import { ProductComponent } from '../ProductComponent';
|
|
4
5
|
import { MdmLockModeEnum } from '../../enums/MdmLockModeEnum';
|
|
@@ -6,6 +7,8 @@ import { MdmProviderEnum } from '../../enums/MdmProviderEnum';
|
|
|
6
7
|
/** Body de PATCH /backoffice/inventory/skus/{sku} (backofficeUpdateProduct); parcial, sin itemType ni trackingMode (inmutables) ni precio. */
|
|
7
8
|
export declare class BackofficeUpdateProductRequest {
|
|
8
9
|
category?: ProductCategoryEnum;
|
|
10
|
+
/** Solo en ACCESSORY. */
|
|
11
|
+
accessorySubcategory?: AccessorySubcategoryEnum;
|
|
9
12
|
sellable?: boolean;
|
|
10
13
|
showInSalesFlow?: boolean;
|
|
11
14
|
/** Solo en kits; reemplaza la lista completa sin tocar los apartados vivos. */
|
|
@@ -24,4 +27,13 @@ export declare class BackofficeUpdateProductRequest {
|
|
|
24
27
|
mdmEnabled?: boolean;
|
|
25
28
|
mdmProvider?: MdmProviderEnum | null;
|
|
26
29
|
mdmLockMode?: MdmLockModeEnum | null;
|
|
30
|
+
/** Prioridad de venta: 100 sale primero en «Recomendados». */
|
|
31
|
+
salePriority?: number;
|
|
32
|
+
highlights?: string[];
|
|
33
|
+
/** 0 = sin garantía. */
|
|
34
|
+
warrantyMonths?: number;
|
|
35
|
+
/** Fecha ISO 8601. */
|
|
36
|
+
launchDate?: string;
|
|
37
|
+
/** Ficha técnica como mapa clave/valor, igual que Product.specs. */
|
|
38
|
+
specs?: Record<string, unknown>;
|
|
27
39
|
}
|
|
@@ -14,6 +14,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const NonBundleCategories_1 = require("../../constants/NonBundleCategories");
|
|
16
16
|
const ProductCategoryEnum_1 = require("../../enums/ProductCategoryEnum");
|
|
17
|
+
const AccessorySubcategoryEnum_1 = require("../../enums/AccessorySubcategoryEnum");
|
|
17
18
|
const ProductTierEnum_1 = require("../../enums/ProductTierEnum");
|
|
18
19
|
const ProductComponent_1 = require("../ProductComponent");
|
|
19
20
|
const MdmLockModeEnum_1 = require("../../enums/MdmLockModeEnum");
|
|
@@ -28,6 +29,11 @@ __decorate([
|
|
|
28
29
|
(0, class_validator_1.IsIn)(NonBundleCategories_1.NON_BUNDLE_CATEGORIES),
|
|
29
30
|
__metadata("design:type", String)
|
|
30
31
|
], BackofficeUpdateProductRequest.prototype, "category", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsEnum)(AccessorySubcategoryEnum_1.AccessorySubcategoryEnum),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], BackofficeUpdateProductRequest.prototype, "accessorySubcategory", void 0);
|
|
31
37
|
__decorate([
|
|
32
38
|
(0, class_validator_1.IsOptional)(),
|
|
33
39
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -116,3 +122,33 @@ __decorate([
|
|
|
116
122
|
(0, class_validator_1.IsEnum)(MdmLockModeEnum_1.MdmLockModeEnum),
|
|
117
123
|
__metadata("design:type", String)
|
|
118
124
|
], BackofficeUpdateProductRequest.prototype, "mdmLockMode", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_validator_1.IsOptional)(),
|
|
127
|
+
(0, class_validator_1.IsInt)(),
|
|
128
|
+
(0, class_validator_1.Min)(0),
|
|
129
|
+
(0, class_validator_1.Max)(100),
|
|
130
|
+
__metadata("design:type", Number)
|
|
131
|
+
], BackofficeUpdateProductRequest.prototype, "salePriority", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, class_validator_1.IsOptional)(),
|
|
134
|
+
(0, class_validator_1.IsArray)(),
|
|
135
|
+
(0, class_validator_1.Matches)(/\S/, { each: true }),
|
|
136
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
137
|
+
__metadata("design:type", Array)
|
|
138
|
+
], BackofficeUpdateProductRequest.prototype, "highlights", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, class_validator_1.IsOptional)(),
|
|
141
|
+
(0, class_validator_1.IsInt)(),
|
|
142
|
+
(0, class_validator_1.Min)(0),
|
|
143
|
+
__metadata("design:type", Number)
|
|
144
|
+
], BackofficeUpdateProductRequest.prototype, "warrantyMonths", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, class_validator_1.IsOptional)(),
|
|
147
|
+
(0, class_validator_1.IsISO8601)(),
|
|
148
|
+
__metadata("design:type", String)
|
|
149
|
+
], BackofficeUpdateProductRequest.prototype, "launchDate", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, class_validator_1.IsOptional)(),
|
|
152
|
+
(0, class_validator_1.IsObject)(),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], BackofficeUpdateProductRequest.prototype, "specs", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReservationLineRef } from './ReservationLineRef';
|
|
2
|
+
/** Componente de la línea con las piezas que quedan HELD de la sesión. */
|
|
3
|
+
export declare class HoldStockComponent {
|
|
4
|
+
sku: string;
|
|
5
|
+
identifiers: string[];
|
|
6
|
+
}
|
|
7
|
+
/** Body de PUT /private/stores/{storeId}/holds (privateHoldStock); fija las piezas de una línea. */
|
|
8
|
+
export declare class HoldStockRequest extends ReservationLineRef {
|
|
9
|
+
sessionId: string;
|
|
10
|
+
retailerId: string;
|
|
11
|
+
components: HoldStockComponent[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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.HoldStockRequest = exports.HoldStockComponent = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const ReservationLineRef_1 = require("./ReservationLineRef");
|
|
16
|
+
/** Componente de la línea con las piezas que quedan HELD de la sesión. */
|
|
17
|
+
class HoldStockComponent {
|
|
18
|
+
}
|
|
19
|
+
exports.HoldStockComponent = HoldStockComponent;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], HoldStockComponent.prototype, "sku", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsArray)(),
|
|
27
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
28
|
+
__metadata("design:type", Array)
|
|
29
|
+
], HoldStockComponent.prototype, "identifiers", void 0);
|
|
30
|
+
/** Body de PUT /private/stores/{storeId}/holds (privateHoldStock); fija las piezas de una línea. */
|
|
31
|
+
class HoldStockRequest extends ReservationLineRef_1.ReservationLineRef {
|
|
32
|
+
}
|
|
33
|
+
exports.HoldStockRequest = HoldStockRequest;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], HoldStockRequest.prototype, "sessionId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], HoldStockRequest.prototype, "retailerId", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsArray)(),
|
|
46
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
47
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
48
|
+
(0, class_transformer_1.Type)(() => HoldStockComponent),
|
|
49
|
+
__metadata("design:type", Array)
|
|
50
|
+
], HoldStockRequest.prototype, "components", void 0);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReservePurposeEnum } from '../../enums/ReservePurposeEnum';
|
|
1
2
|
/** Body de PUT /private/stores/{storeId}/reservations (privateReserveStock); reserva una línea, kit completo. */
|
|
2
3
|
export declare class ReserveStockRequest {
|
|
3
4
|
sessionId: string;
|
|
@@ -7,4 +8,6 @@ export declare class ReserveStockRequest {
|
|
|
7
8
|
retailerId: string;
|
|
8
9
|
sku: string;
|
|
9
10
|
qty: number;
|
|
11
|
+
/** GIFT aparta un regalo de Promociones; ausente = apartado normal de venta. */
|
|
12
|
+
purpose?: ReservePurposeEnum;
|
|
10
13
|
}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ReserveStockRequest = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ReservePurposeEnum_1 = require("../../enums/ReservePurposeEnum");
|
|
14
15
|
/** Body de PUT /private/stores/{storeId}/reservations (privateReserveStock); reserva una línea, kit completo. */
|
|
15
16
|
class ReserveStockRequest {
|
|
16
17
|
}
|
|
@@ -40,3 +41,8 @@ __decorate([
|
|
|
40
41
|
(0, class_validator_1.Min)(1),
|
|
41
42
|
__metadata("design:type", Number)
|
|
42
43
|
], ReserveStockRequest.prototype, "qty", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_validator_1.IsEnum)(ReservePurposeEnum_1.ReservePurposeEnum),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], ReserveStockRequest.prototype, "purpose", void 0);
|
|
@@ -24,3 +24,9 @@ __decorate([
|
|
|
24
24
|
(0, class_validator_1.MinLength)(4),
|
|
25
25
|
__metadata("design:type", String)
|
|
26
26
|
], SuggestPiecesQuery.prototype, "prefix", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], SuggestPiecesQuery.prototype, "sessionId", void 0);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { InventoryItemStatusEnum } from '../../enums/InventoryItemStatusEnum';
|
|
2
2
|
import type { InventoryMovementTypeEnum } from '../../enums/InventoryMovementTypeEnum';
|
|
3
|
+
import type { InventoryMovementReasonEnum } from '../../enums/InventoryMovementReasonEnum';
|
|
3
4
|
import type { SkuPriceEntry } from './SkuPriceEntry';
|
|
4
5
|
/** Un movimiento del libro de inventario. */
|
|
5
6
|
export interface InventoryMovementEntry {
|
|
@@ -11,6 +12,8 @@ export interface InventoryMovementEntry {
|
|
|
11
12
|
identifier: string | null;
|
|
12
13
|
occurredAt: string;
|
|
13
14
|
createdBy: string;
|
|
15
|
+
/** Motivo guardado en el MOV#; ausente en los tipos que no llevan motivo. */
|
|
16
|
+
reason?: InventoryMovementReasonEnum;
|
|
14
17
|
}
|
|
15
18
|
/** Pieza de una tienda; status AVAILABLE, SOLD o DAMAGED. */
|
|
16
19
|
export interface InventoryPieceEntry {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HoldStockComponent } from '../requests/HoldStockRequest';
|
|
2
|
+
/** Response de privateHoldStock: la línea con las piezas que quedaron HELD. */
|
|
3
|
+
export interface HoldStockResponse {
|
|
4
|
+
lineId: string;
|
|
5
|
+
reservationId: string;
|
|
6
|
+
sessionId: string;
|
|
7
|
+
components: HoldStockComponent[];
|
|
8
|
+
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { MdmLockModeEnum } from '../../enums/MdmLockModeEnum';
|
|
2
2
|
import type { MdmProviderEnum } from '../../enums/MdmProviderEnum';
|
|
3
3
|
import type { ProductCategoryEnum } from '../../enums/ProductCategoryEnum';
|
|
4
|
+
import type { AccessorySubcategoryEnum } from '../../enums/AccessorySubcategoryEnum';
|
|
4
5
|
import type { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
5
6
|
import type { TrackingModeEnum } from '../../enums/TrackingModeEnum';
|
|
6
7
|
import type { ItemTypeEnum } from '../../enums/ItemTypeEnum';
|
|
7
8
|
import type { ProductComponent } from '../ProductComponent';
|
|
9
|
+
/** Componente de un kit en el catálogo de venta, con la categoría de su SKU. */
|
|
10
|
+
export interface StoreCatalogComponent extends ProductComponent {
|
|
11
|
+
category?: ProductCategoryEnum;
|
|
12
|
+
}
|
|
8
13
|
/** Fila por SKU del catálogo de venta de una tienda (privateGetStoreStockCatalog). */
|
|
9
14
|
export interface StoreCatalogItem {
|
|
10
15
|
sku: string;
|
|
@@ -12,6 +17,8 @@ export interface StoreCatalogItem {
|
|
|
12
17
|
available: number;
|
|
13
18
|
basePriceCents: number;
|
|
14
19
|
category: ProductCategoryEnum;
|
|
20
|
+
/** Solo en ACCESSORY. */
|
|
21
|
+
accessorySubcategory?: AccessorySubcategoryEnum;
|
|
15
22
|
trackingMode: TrackingModeEnum;
|
|
16
23
|
brand: string;
|
|
17
24
|
model: string;
|
|
@@ -24,7 +31,7 @@ export interface StoreCatalogItem {
|
|
|
24
31
|
mdmProvider: MdmProviderEnum | null;
|
|
25
32
|
mdmLockMode: MdmLockModeEnum | null;
|
|
26
33
|
/** Solo si es kit. */
|
|
27
|
-
components?:
|
|
34
|
+
components?: StoreCatalogComponent[];
|
|
28
35
|
/** Producto físico o servicio. Ausente = PRODUCT. */
|
|
29
36
|
itemType?: ItemTypeEnum;
|
|
30
37
|
/** Nombre visible para kits y servicios, que no tienen marca/modelo. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Subcategoría de un producto ACCESSORY; sirve para regalar «por gama» en Promociones. */
|
|
2
|
+
export declare enum AccessorySubcategoryEnum {
|
|
3
|
+
AUDIO = "AUDIO",
|
|
4
|
+
CHARGING = "CHARGING",
|
|
5
|
+
PROTECTION = "PROTECTION",
|
|
6
|
+
CABLES = "CABLES",
|
|
7
|
+
WEARABLES = "WEARABLES",
|
|
8
|
+
OTHER = "OTHER"
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccessorySubcategoryEnum = void 0;
|
|
4
|
+
/** Subcategoría de un producto ACCESSORY; sirve para regalar «por gama» en Promociones. */
|
|
5
|
+
var AccessorySubcategoryEnum;
|
|
6
|
+
(function (AccessorySubcategoryEnum) {
|
|
7
|
+
AccessorySubcategoryEnum["AUDIO"] = "AUDIO";
|
|
8
|
+
AccessorySubcategoryEnum["CHARGING"] = "CHARGING";
|
|
9
|
+
AccessorySubcategoryEnum["PROTECTION"] = "PROTECTION";
|
|
10
|
+
AccessorySubcategoryEnum["CABLES"] = "CABLES";
|
|
11
|
+
AccessorySubcategoryEnum["WEARABLES"] = "WEARABLES";
|
|
12
|
+
AccessorySubcategoryEnum["OTHER"] = "OTHER";
|
|
13
|
+
})(AccessorySubcategoryEnum || (exports.AccessorySubcategoryEnum = AccessorySubcategoryEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InventoryInboundMessageTypeEnum = void 0;
|
|
4
|
+
/** Tipo de aviso que el wizard publica en la cola de inventario del catálogo. */
|
|
5
|
+
var InventoryInboundMessageTypeEnum;
|
|
6
|
+
(function (InventoryInboundMessageTypeEnum) {
|
|
7
|
+
InventoryInboundMessageTypeEnum["SALE_APPLIED"] = "SALE_APPLIED";
|
|
8
|
+
InventoryInboundMessageTypeEnum["RETURN"] = "RETURN";
|
|
9
|
+
})(InventoryInboundMessageTypeEnum || (exports.InventoryInboundMessageTypeEnum = InventoryInboundMessageTypeEnum = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Estado de una unidad física (IMEI) en inventario.
|
|
3
|
-
* Transiciones: AVAILABLE → RESERVED → SOLD/AVAILABLE (release); RETURNED desde SOLD; DAMAGED.
|
|
3
|
+
* Transiciones: AVAILABLE → RESERVED → SOLD/AVAILABLE (release); AVAILABLE → HELD → SOLD/AVAILABLE; RETURNED desde SOLD; DAMAGED.
|
|
4
4
|
* @enum {string}
|
|
5
5
|
*
|
|
6
6
|
* @property {string} AVAILABLE - Disponible en stock.
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @property {string} RETURNED - Devuelta por el cliente.
|
|
10
10
|
* @property {string} DAMAGED - Dañada, fuera de stock vendible.
|
|
11
11
|
* @property {string} IN_TRANSIT - En traspaso entre tiendas, fuera de stock vendible.
|
|
12
|
+
* @property {string} HELD - Capturada por una sesión de venta; no vence hasta venderse o soltarse.
|
|
12
13
|
*/
|
|
13
14
|
export declare enum InventoryItemStatusEnum {
|
|
14
15
|
AVAILABLE = "AVAILABLE",
|
|
@@ -16,5 +17,6 @@ export declare enum InventoryItemStatusEnum {
|
|
|
16
17
|
SOLD = "SOLD",
|
|
17
18
|
RETURNED = "RETURNED",
|
|
18
19
|
DAMAGED = "DAMAGED",
|
|
19
|
-
IN_TRANSIT = "IN_TRANSIT"
|
|
20
|
+
IN_TRANSIT = "IN_TRANSIT",
|
|
21
|
+
HELD = "HELD"
|
|
20
22
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InventoryItemStatusEnum = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Estado de una unidad física (IMEI) en inventario.
|
|
6
|
-
* Transiciones: AVAILABLE → RESERVED → SOLD/AVAILABLE (release); RETURNED desde SOLD; DAMAGED.
|
|
6
|
+
* Transiciones: AVAILABLE → RESERVED → SOLD/AVAILABLE (release); AVAILABLE → HELD → SOLD/AVAILABLE; RETURNED desde SOLD; DAMAGED.
|
|
7
7
|
* @enum {string}
|
|
8
8
|
*
|
|
9
9
|
* @property {string} AVAILABLE - Disponible en stock.
|
|
@@ -12,6 +12,7 @@ exports.InventoryItemStatusEnum = void 0;
|
|
|
12
12
|
* @property {string} RETURNED - Devuelta por el cliente.
|
|
13
13
|
* @property {string} DAMAGED - Dañada, fuera de stock vendible.
|
|
14
14
|
* @property {string} IN_TRANSIT - En traspaso entre tiendas, fuera de stock vendible.
|
|
15
|
+
* @property {string} HELD - Capturada por una sesión de venta; no vence hasta venderse o soltarse.
|
|
15
16
|
*/
|
|
16
17
|
var InventoryItemStatusEnum;
|
|
17
18
|
(function (InventoryItemStatusEnum) {
|
|
@@ -21,4 +22,5 @@ var InventoryItemStatusEnum;
|
|
|
21
22
|
InventoryItemStatusEnum["RETURNED"] = "RETURNED";
|
|
22
23
|
InventoryItemStatusEnum["DAMAGED"] = "DAMAGED";
|
|
23
24
|
InventoryItemStatusEnum["IN_TRANSIT"] = "IN_TRANSIT";
|
|
25
|
+
InventoryItemStatusEnum["HELD"] = "HELD";
|
|
24
26
|
})(InventoryItemStatusEnum || (exports.InventoryItemStatusEnum = InventoryItemStatusEnum = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReservePurposeEnum = void 0;
|
|
4
|
+
/** Motivo de un apartado; sin valor es un apartado normal de venta. */
|
|
5
|
+
var ReservePurposeEnum;
|
|
6
|
+
(function (ReservePurposeEnum) {
|
|
7
|
+
ReservePurposeEnum["GIFT"] = "GIFT";
|
|
8
|
+
})(ReservePurposeEnum || (exports.ReservePurposeEnum = ReservePurposeEnum = {}));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InventoryReturnMessage } from './InventoryReturnMessage';
|
|
2
|
+
import type { InventorySaleAppliedMessage } from './InventorySaleAppliedMessage';
|
|
3
|
+
/** Cualquier aviso de la cola de inventario; se discrimina por `type`. */
|
|
4
|
+
export type InventoryInboundMessage = InventorySaleAppliedMessage | InventoryReturnMessage;
|