@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,162 @@
|
|
|
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.RetailPromotionInboundMessage = exports.RetailPromotionInboundLine = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const RetailPromotionInboundMessageTypeEnum_1 = require("../enums/RetailPromotionInboundMessageTypeEnum");
|
|
16
|
+
const WizardLineRoleEnum_1 = require("../enums/WizardLineRoleEnum");
|
|
17
|
+
/** Línea de la venta en el mensaje de Promociones. */
|
|
18
|
+
class RetailPromotionInboundLine {
|
|
19
|
+
}
|
|
20
|
+
exports.RetailPromotionInboundLine = RetailPromotionInboundLine;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], RetailPromotionInboundLine.prototype, "lineId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], RetailPromotionInboundLine.prototype, "sku", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsInt)(),
|
|
33
|
+
(0, class_validator_1.Min)(1),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], RetailPromotionInboundLine.prototype, "qty", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.IsEnum)(WizardLineRoleEnum_1.WizardLineRoleEnum),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], RetailPromotionInboundLine.prototype, "role", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], RetailPromotionInboundLine.prototype, "linkedLineId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], RetailPromotionInboundLine.prototype, "promotionId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
(0, class_validator_1.IsInt)(),
|
|
56
|
+
(0, class_validator_1.Min)(1),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], RetailPromotionInboundLine.prototype, "promotionVersion", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
(0, class_validator_1.IsString)(),
|
|
62
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], RetailPromotionInboundLine.prototype, "discountCode", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
67
|
+
(0, class_validator_1.IsInt)(),
|
|
68
|
+
(0, class_validator_1.Min)(0),
|
|
69
|
+
__metadata("design:type", Number)
|
|
70
|
+
], RetailPromotionInboundLine.prototype, "discountCents", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsInt)(),
|
|
73
|
+
(0, class_validator_1.Min)(0),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], RetailPromotionInboundLine.prototype, "originalPriceCents", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.IsArray)(),
|
|
78
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
79
|
+
__metadata("design:type", Array)
|
|
80
|
+
], RetailPromotionInboundLine.prototype, "identifiers", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, class_validator_1.IsBoolean)(),
|
|
84
|
+
__metadata("design:type", Boolean)
|
|
85
|
+
], RetailPromotionInboundLine.prototype, "returned", void 0);
|
|
86
|
+
/** Venta confirmada o cancelada que el wizard publica en RetailPromotionInboundQueue; crédito = trae creditId. */
|
|
87
|
+
class RetailPromotionInboundMessage {
|
|
88
|
+
}
|
|
89
|
+
exports.RetailPromotionInboundMessage = RetailPromotionInboundMessage;
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, class_validator_1.IsEnum)(RetailPromotionInboundMessageTypeEnum_1.RetailPromotionInboundMessageTypeEnum),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], RetailPromotionInboundMessage.prototype, "type", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, class_validator_1.IsString)(),
|
|
96
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], RetailPromotionInboundMessage.prototype, "tenantId", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsString)(),
|
|
101
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], RetailPromotionInboundMessage.prototype, "retailerId", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, class_validator_1.IsString)(),
|
|
106
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], RetailPromotionInboundMessage.prototype, "storeId", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_validator_1.IsString)(),
|
|
111
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], RetailPromotionInboundMessage.prototype, "saleId", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, class_validator_1.IsString)(),
|
|
116
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
117
|
+
__metadata("design:type", String)
|
|
118
|
+
], RetailPromotionInboundMessage.prototype, "sessionId", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, class_validator_1.IsString)(),
|
|
121
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
122
|
+
__metadata("design:type", String)
|
|
123
|
+
], RetailPromotionInboundMessage.prototype, "customerId", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, class_validator_1.IsISO8601)(),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], RetailPromotionInboundMessage.prototype, "soldAt", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, class_validator_1.IsISO8601)(),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], RetailPromotionInboundMessage.prototype, "occurredAt", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, class_validator_1.IsOptional)(),
|
|
134
|
+
(0, class_validator_1.IsString)(),
|
|
135
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
136
|
+
__metadata("design:type", String)
|
|
137
|
+
], RetailPromotionInboundMessage.prototype, "creditId", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, class_validator_1.IsOptional)(),
|
|
140
|
+
(0, class_validator_1.IsString)(),
|
|
141
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], RetailPromotionInboundMessage.prototype, "fiadoDirectoryId", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, class_validator_1.IsOptional)(),
|
|
146
|
+
(0, class_validator_1.IsString)(),
|
|
147
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
148
|
+
__metadata("design:type", String)
|
|
149
|
+
], RetailPromotionInboundMessage.prototype, "salePromotionId", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, class_validator_1.IsOptional)(),
|
|
152
|
+
(0, class_validator_1.IsInt)(),
|
|
153
|
+
(0, class_validator_1.Min)(1),
|
|
154
|
+
__metadata("design:type", Number)
|
|
155
|
+
], RetailPromotionInboundMessage.prototype, "salePromotionVersion", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, class_validator_1.IsArray)(),
|
|
158
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
159
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
160
|
+
(0, class_transformer_1.Type)(() => RetailPromotionInboundLine),
|
|
161
|
+
__metadata("design:type", Array)
|
|
162
|
+
], RetailPromotionInboundMessage.prototype, "lines", void 0);
|
|
@@ -13,9 +13,8 @@ export interface SaleCompletedV1 {
|
|
|
13
13
|
sku: string;
|
|
14
14
|
imei: string | null;
|
|
15
15
|
/**
|
|
16
|
-
* Lo
|
|
17
|
-
*
|
|
18
|
-
* `equipmentPriceCents`, NUNCA redefinir este campo.
|
|
16
|
+
* Lo cobrado en caja al cerrar: enganche + lo no financiado (en contado, el total).
|
|
17
|
+
* Desambiguar con `type` + `equipmentPriceCents`.
|
|
19
18
|
*/
|
|
20
19
|
amountCents: number;
|
|
21
20
|
/**
|
|
@@ -23,6 +23,7 @@ export * from './enums/BlockedReasonEnum';
|
|
|
23
23
|
export * from './enums/BlockedCategoryEnum';
|
|
24
24
|
export * from './enums/WizardLineStatusEnum';
|
|
25
25
|
export * from './enums/LinePaymentTypeEnum';
|
|
26
|
+
export * from './enums/WizardLineRoleEnum';
|
|
26
27
|
export * from './dtos/WizardConsents';
|
|
27
28
|
export * from './dtos/WizardPayment';
|
|
28
29
|
export * from './dtos/WizardProduct';
|
|
@@ -38,7 +39,10 @@ export * from './dtos/WizardResumeTarget';
|
|
|
38
39
|
export * from './dtos/WizardBlocked';
|
|
39
40
|
export * from './dtos/WizardLineProduct';
|
|
40
41
|
export * from './dtos/WizardLineIdentifiers';
|
|
42
|
+
export * from './dtos/WizardLinePromotionFields';
|
|
43
|
+
export * from './dtos/WizardFinancingPreview';
|
|
41
44
|
export * from './dtos/WizardReservedLine';
|
|
45
|
+
export * from './dtos/WizardGiftLine';
|
|
42
46
|
export * from './dtos/SaleLine';
|
|
43
47
|
export * from './dtos/WizardSession';
|
|
44
48
|
export * from './dtos/OtpVerification';
|
|
@@ -57,6 +61,10 @@ export * from './dtos/requests/KycManualRequest';
|
|
|
57
61
|
export * from './dtos/requests/ProofOfAddressPrepareRequest';
|
|
58
62
|
export * from './dtos/requests/OccupationRequest';
|
|
59
63
|
export * from './dtos/requests/AddProductRequest';
|
|
64
|
+
export * from './dtos/requests/PinSessionPiecesRequest';
|
|
65
|
+
export * from './dtos/requests/ApplyLinePromotionRequest';
|
|
66
|
+
export * from './dtos/requests/SetAnchorGiftsRequest';
|
|
67
|
+
export * from './dtos/requests/ApplySalePromotionRequest';
|
|
60
68
|
export * from './dtos/requests/DeleteProductRequest';
|
|
61
69
|
export * from './dtos/requests/SetPaymentMethodRequest';
|
|
62
70
|
export * from './dtos/requests/ExternalReferralRequest';
|
|
@@ -129,6 +137,11 @@ export * from './events/SaleCancelledV1';
|
|
|
129
137
|
export * from './events/SaleCompletedV2';
|
|
130
138
|
export * from './events/SaleCancelledV2';
|
|
131
139
|
export * from './events/SessionExpiredV1';
|
|
140
|
+
export * from './enums/RetailPromotionInboundMessageTypeEnum';
|
|
141
|
+
export * from './events/RetailPromotionInboundMessage';
|
|
142
|
+
export * from './events/RetailCommissionInboundMessage';
|
|
132
143
|
export * from './enums/WizardSessionLookupStatusEnum';
|
|
133
144
|
export * from './dtos/WizardSessionLookupEntry';
|
|
134
145
|
export * from './dtos/responses/WizardSessionLookupResponse';
|
|
146
|
+
export * from './dtos/responses/PrivateWizardSessionResponse';
|
|
147
|
+
export * from './dtos/responses/SetAnchorGiftsResponse';
|
|
@@ -41,6 +41,7 @@ __exportStar(require("./enums/BlockedReasonEnum"), exports);
|
|
|
41
41
|
__exportStar(require("./enums/BlockedCategoryEnum"), exports);
|
|
42
42
|
__exportStar(require("./enums/WizardLineStatusEnum"), exports);
|
|
43
43
|
__exportStar(require("./enums/LinePaymentTypeEnum"), exports);
|
|
44
|
+
__exportStar(require("./enums/WizardLineRoleEnum"), exports);
|
|
44
45
|
// DTOs anidados
|
|
45
46
|
__exportStar(require("./dtos/WizardConsents"), exports);
|
|
46
47
|
__exportStar(require("./dtos/WizardPayment"), exports);
|
|
@@ -57,7 +58,10 @@ __exportStar(require("./dtos/WizardResumeTarget"), exports);
|
|
|
57
58
|
__exportStar(require("./dtos/WizardBlocked"), exports);
|
|
58
59
|
__exportStar(require("./dtos/WizardLineProduct"), exports);
|
|
59
60
|
__exportStar(require("./dtos/WizardLineIdentifiers"), exports);
|
|
61
|
+
__exportStar(require("./dtos/WizardLinePromotionFields"), exports);
|
|
62
|
+
__exportStar(require("./dtos/WizardFinancingPreview"), exports);
|
|
60
63
|
__exportStar(require("./dtos/WizardReservedLine"), exports);
|
|
64
|
+
__exportStar(require("./dtos/WizardGiftLine"), exports);
|
|
61
65
|
__exportStar(require("./dtos/SaleLine"), exports);
|
|
62
66
|
// Entidades principales (shapes de estado/persistencia — planas)
|
|
63
67
|
__exportStar(require("./dtos/WizardSession"), exports);
|
|
@@ -79,6 +83,10 @@ __exportStar(require("./dtos/requests/KycManualRequest"), exports);
|
|
|
79
83
|
__exportStar(require("./dtos/requests/ProofOfAddressPrepareRequest"), exports);
|
|
80
84
|
__exportStar(require("./dtos/requests/OccupationRequest"), exports);
|
|
81
85
|
__exportStar(require("./dtos/requests/AddProductRequest"), exports);
|
|
86
|
+
__exportStar(require("./dtos/requests/PinSessionPiecesRequest"), exports);
|
|
87
|
+
__exportStar(require("./dtos/requests/ApplyLinePromotionRequest"), exports);
|
|
88
|
+
__exportStar(require("./dtos/requests/SetAnchorGiftsRequest"), exports);
|
|
89
|
+
__exportStar(require("./dtos/requests/ApplySalePromotionRequest"), exports);
|
|
82
90
|
__exportStar(require("./dtos/requests/DeleteProductRequest"), exports);
|
|
83
91
|
__exportStar(require("./dtos/requests/SetPaymentMethodRequest"), exports);
|
|
84
92
|
__exportStar(require("./dtos/requests/ExternalReferralRequest"), exports);
|
|
@@ -160,7 +168,13 @@ __exportStar(require("./events/SaleCancelledV1"), exports);
|
|
|
160
168
|
__exportStar(require("./events/SaleCompletedV2"), exports);
|
|
161
169
|
__exportStar(require("./events/SaleCancelledV2"), exports);
|
|
162
170
|
__exportStar(require("./events/SessionExpiredV1"), exports);
|
|
171
|
+
__exportStar(require("./enums/RetailPromotionInboundMessageTypeEnum"), exports);
|
|
172
|
+
__exportStar(require("./events/RetailPromotionInboundMessage"), exports);
|
|
173
|
+
__exportStar(require("./events/RetailCommissionInboundMessage"), exports);
|
|
163
174
|
// Lookup privado por lote (GET /private/wizard-sessions/batch)
|
|
164
175
|
__exportStar(require("./enums/WizardSessionLookupStatusEnum"), exports);
|
|
165
176
|
__exportStar(require("./dtos/WizardSessionLookupEntry"), exports);
|
|
166
177
|
__exportStar(require("./dtos/responses/WizardSessionLookupResponse"), exports);
|
|
178
|
+
// M2M de Promociones (lectura privada de la sesión y regalo)
|
|
179
|
+
__exportStar(require("./dtos/responses/PrivateWizardSessionResponse"), exports);
|
|
180
|
+
__exportStar(require("./dtos/responses/SetAnchorGiftsResponse"), exports);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -122,6 +122,9 @@ export * as RetailCustomer from './retailCustomer';
|
|
|
122
122
|
// RetailWizard: DTOs/enums del lambda retail-wizard-business (comp 04 — wizard de venta de contado:
|
|
123
123
|
// saga de sesión, OTP, KYC, venta y prospectos; SureKeep Fase 2 — pista Retail).
|
|
124
124
|
export * as RetailWizard from './retailWizard';
|
|
125
|
+
// RetailPromotions: DTOs/enums de retail-promotions-business (promos de venta, códigos de descuento y
|
|
126
|
+
// cupones de VentasLuga). Porcentajes en puntos base, dinero en centavos.
|
|
127
|
+
export * as RetailPromotions from './retailPromotions';
|
|
125
128
|
export * as DatalakeQuery from './datalakeQuery';
|
|
126
129
|
// LoanConfig: DTOs/enums del lambda loan-config-business (comp 09 — parámetros operativos del SOFOM).
|
|
127
130
|
export * as LoanConfig from './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';
|
|
@@ -40,6 +41,8 @@ export class Product {
|
|
|
40
41
|
|
|
41
42
|
// Campos del inventario multi-item; opcionales hasta que todo producto pase por la puerta de entrada.
|
|
42
43
|
category?: ProductCategoryEnum;
|
|
44
|
+
/** Solo en ACCESSORY. */
|
|
45
|
+
accessorySubcategory?: AccessorySubcategoryEnum;
|
|
43
46
|
trackingMode?: TrackingModeEnum;
|
|
44
47
|
/** Se puede vender suelto (fuera de un kit). */
|
|
45
48
|
sellable?: boolean;
|
|
@@ -51,4 +54,10 @@ export class Product {
|
|
|
51
54
|
currentPriceSk?: string | null;
|
|
52
55
|
/** Producto físico o servicio; inmutable tras el alta. Ausente = PRODUCT. */
|
|
53
56
|
itemType?: ItemTypeEnum;
|
|
57
|
+
/** Prioridad de venta 0–100; «Recomendados» ordena por ella. */
|
|
58
|
+
salePriority?: number;
|
|
59
|
+
highlights?: string[];
|
|
60
|
+
warrantyMonths?: number;
|
|
61
|
+
/** Fecha ISO 8601. */
|
|
62
|
+
launchDate?: string;
|
|
54
63
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IsArray, IsBoolean, IsEnum, IsIn, IsOptional, IsString, Length, Matches, Validate, ValidateIf } from 'class-validator';
|
|
1
|
+
import { IsArray, IsBoolean, IsEnum, IsIn, IsInt, IsISO8601, IsObject, IsOptional, IsString, Length, Matches, Max, Min, Validate, ValidateIf } from 'class-validator';
|
|
2
2
|
import { SKU_PATTERN } from '../../constants/SkuPattern';
|
|
3
3
|
import { NON_BUNDLE_CATEGORIES } from '../../constants/NonBundleCategories';
|
|
4
4
|
import { ProductCategoryEnum } from '../../enums/ProductCategoryEnum';
|
|
5
|
+
import { AccessorySubcategoryEnum } from '../../enums/AccessorySubcategoryEnum';
|
|
5
6
|
import { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
6
7
|
import { TrackingModeEnum } from '../../enums/TrackingModeEnum';
|
|
7
8
|
import { MdmLockModeEnum } from '../../enums/MdmLockModeEnum';
|
|
@@ -19,6 +20,11 @@ export class BackofficeCreateProductRequest {
|
|
|
19
20
|
@IsIn(NON_BUNDLE_CATEGORIES)
|
|
20
21
|
category!: ProductCategoryEnum;
|
|
21
22
|
|
|
23
|
+
/** Solo en ACCESSORY. */
|
|
24
|
+
@IsOptional()
|
|
25
|
+
@IsEnum(AccessorySubcategoryEnum)
|
|
26
|
+
accessorySubcategory?: AccessorySubcategoryEnum;
|
|
27
|
+
|
|
22
28
|
/** Inmutable tras el alta. */
|
|
23
29
|
@IsEnum(TrackingModeEnum)
|
|
24
30
|
trackingMode!: TrackingModeEnum;
|
|
@@ -89,4 +95,33 @@ export class BackofficeCreateProductRequest {
|
|
|
89
95
|
@IsOptional()
|
|
90
96
|
@IsEnum(MdmLockModeEnum)
|
|
91
97
|
mdmLockMode?: MdmLockModeEnum | null;
|
|
98
|
+
|
|
99
|
+
/** Prioridad de venta: 100 sale primero en «Recomendados». */
|
|
100
|
+
@IsOptional()
|
|
101
|
+
@IsInt()
|
|
102
|
+
@Min(0)
|
|
103
|
+
@Max(100)
|
|
104
|
+
salePriority?: number;
|
|
105
|
+
|
|
106
|
+
@IsOptional()
|
|
107
|
+
@IsArray()
|
|
108
|
+
@Matches(/\S/, { each: true })
|
|
109
|
+
@IsString({ each: true })
|
|
110
|
+
highlights?: string[];
|
|
111
|
+
|
|
112
|
+
/** 0 = sin garantía. */
|
|
113
|
+
@IsOptional()
|
|
114
|
+
@IsInt()
|
|
115
|
+
@Min(0)
|
|
116
|
+
warrantyMonths?: number;
|
|
117
|
+
|
|
118
|
+
/** Fecha ISO 8601. */
|
|
119
|
+
@IsOptional()
|
|
120
|
+
@IsISO8601()
|
|
121
|
+
launchDate?: string;
|
|
122
|
+
|
|
123
|
+
/** Ficha técnica como mapa clave/valor, igual que Product.specs. */
|
|
124
|
+
@IsOptional()
|
|
125
|
+
@IsObject()
|
|
126
|
+
specs?: Record<string, unknown>;
|
|
92
127
|
}
|
|
@@ -31,4 +31,10 @@ export class BackofficeRegisterAdjustmentRequest {
|
|
|
31
31
|
@Matches(/^\S+$/, { each: true })
|
|
32
32
|
@IsString({ each: true })
|
|
33
33
|
identifiers?: string[];
|
|
34
|
+
|
|
35
|
+
/** movementId del MOV# que este ajuste corrige; el catálogo responde 404 si no existe. */
|
|
36
|
+
@IsOptional()
|
|
37
|
+
@Matches(/^\S+$/)
|
|
38
|
+
@IsString()
|
|
39
|
+
reversesMovementId?: string;
|
|
34
40
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Type } from 'class-transformer';
|
|
2
|
-
import { ArrayMinSize, IsArray, IsBoolean, IsEnum, IsIn, IsOptional, IsString, Matches, Validate, ValidateNested } from 'class-validator';
|
|
2
|
+
import { ArrayMinSize, IsArray, IsBoolean, IsEnum, IsIn, IsInt, IsISO8601, IsObject, IsOptional, IsString, Matches, Max, Min, Validate, ValidateNested } from 'class-validator';
|
|
3
3
|
import { NON_BUNDLE_CATEGORIES } from '../../constants/NonBundleCategories';
|
|
4
4
|
import { ProductCategoryEnum } from '../../enums/ProductCategoryEnum';
|
|
5
|
+
import { AccessorySubcategoryEnum } from '../../enums/AccessorySubcategoryEnum';
|
|
5
6
|
import { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
6
7
|
import { ProductComponent } from '../ProductComponent';
|
|
7
8
|
import { MdmLockModeEnum } from '../../enums/MdmLockModeEnum';
|
|
@@ -14,6 +15,11 @@ export class BackofficeUpdateProductRequest {
|
|
|
14
15
|
@IsIn(NON_BUNDLE_CATEGORIES)
|
|
15
16
|
category?: ProductCategoryEnum;
|
|
16
17
|
|
|
18
|
+
/** Solo en ACCESSORY. */
|
|
19
|
+
@IsOptional()
|
|
20
|
+
@IsEnum(AccessorySubcategoryEnum)
|
|
21
|
+
accessorySubcategory?: AccessorySubcategoryEnum;
|
|
22
|
+
|
|
17
23
|
@IsOptional()
|
|
18
24
|
@IsBoolean()
|
|
19
25
|
sellable?: boolean;
|
|
@@ -90,4 +96,33 @@ export class BackofficeUpdateProductRequest {
|
|
|
90
96
|
@IsOptional()
|
|
91
97
|
@IsEnum(MdmLockModeEnum)
|
|
92
98
|
mdmLockMode?: MdmLockModeEnum | null;
|
|
99
|
+
|
|
100
|
+
/** Prioridad de venta: 100 sale primero en «Recomendados». */
|
|
101
|
+
@IsOptional()
|
|
102
|
+
@IsInt()
|
|
103
|
+
@Min(0)
|
|
104
|
+
@Max(100)
|
|
105
|
+
salePriority?: number;
|
|
106
|
+
|
|
107
|
+
@IsOptional()
|
|
108
|
+
@IsArray()
|
|
109
|
+
@Matches(/\S/, { each: true })
|
|
110
|
+
@IsString({ each: true })
|
|
111
|
+
highlights?: string[];
|
|
112
|
+
|
|
113
|
+
/** 0 = sin garantía. */
|
|
114
|
+
@IsOptional()
|
|
115
|
+
@IsInt()
|
|
116
|
+
@Min(0)
|
|
117
|
+
warrantyMonths?: number;
|
|
118
|
+
|
|
119
|
+
/** Fecha ISO 8601. */
|
|
120
|
+
@IsOptional()
|
|
121
|
+
@IsISO8601()
|
|
122
|
+
launchDate?: string;
|
|
123
|
+
|
|
124
|
+
/** Ficha técnica como mapa clave/valor, igual que Product.specs. */
|
|
125
|
+
@IsOptional()
|
|
126
|
+
@IsObject()
|
|
127
|
+
specs?: Record<string, unknown>;
|
|
93
128
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Type } from 'class-transformer';
|
|
2
|
+
import { ArrayMinSize, IsArray, IsNotEmpty, IsString, ValidateNested } from 'class-validator';
|
|
3
|
+
import { ReservationLineRef } from './ReservationLineRef';
|
|
4
|
+
|
|
5
|
+
/** Componente de la línea con las piezas que quedan HELD de la sesión. */
|
|
6
|
+
export class HoldStockComponent {
|
|
7
|
+
@IsString()
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
sku!: string;
|
|
10
|
+
|
|
11
|
+
@IsArray()
|
|
12
|
+
@IsString({ each: true })
|
|
13
|
+
identifiers!: string[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Body de PUT /private/stores/{storeId}/holds (privateHoldStock); fija las piezas de una línea. */
|
|
17
|
+
export class HoldStockRequest extends ReservationLineRef {
|
|
18
|
+
@IsString()
|
|
19
|
+
@IsNotEmpty()
|
|
20
|
+
sessionId!: string;
|
|
21
|
+
|
|
22
|
+
@IsString()
|
|
23
|
+
@IsNotEmpty()
|
|
24
|
+
retailerId!: string;
|
|
25
|
+
|
|
26
|
+
@IsArray()
|
|
27
|
+
@ArrayMinSize(1)
|
|
28
|
+
@ValidateNested({ each: true })
|
|
29
|
+
@Type(() => HoldStockComponent)
|
|
30
|
+
components!: HoldStockComponent[];
|
|
31
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IsInt, IsString, Min } from 'class-validator';
|
|
1
|
+
import { IsEnum, IsInt, IsOptional, IsString, Min } from 'class-validator';
|
|
2
|
+
import { ReservePurposeEnum } from '../../enums/ReservePurposeEnum';
|
|
2
3
|
|
|
3
4
|
/** Body de PUT /private/stores/{storeId}/reservations (privateReserveStock); reserva una línea, kit completo. */
|
|
4
5
|
export class ReserveStockRequest {
|
|
@@ -21,4 +22,9 @@ export class ReserveStockRequest {
|
|
|
21
22
|
@IsInt()
|
|
22
23
|
@Min(1)
|
|
23
24
|
qty!: number;
|
|
25
|
+
|
|
26
|
+
/** GIFT aparta un regalo de Promociones; ausente = apartado normal de venta. */
|
|
27
|
+
@IsOptional()
|
|
28
|
+
@IsEnum(ReservePurposeEnum)
|
|
29
|
+
purpose?: ReservePurposeEnum;
|
|
24
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsString, MinLength } from 'class-validator';
|
|
1
|
+
import { IsNotEmpty, IsOptional, IsString, MinLength } from 'class-validator';
|
|
2
2
|
|
|
3
3
|
/** Query de GET /private/stores/{storeId}/pieces (privateSuggestPieces); sku es el componente si es kit. */
|
|
4
4
|
export class SuggestPiecesQuery {
|
|
@@ -8,4 +8,10 @@ export class SuggestPiecesQuery {
|
|
|
8
8
|
@IsString()
|
|
9
9
|
@MinLength(4)
|
|
10
10
|
prefix!: string;
|
|
11
|
+
|
|
12
|
+
/** Sesión que pide; incluye sus propias piezas HELD en las sugerencias. */
|
|
13
|
+
@IsOptional()
|
|
14
|
+
@IsString()
|
|
15
|
+
@IsNotEmpty()
|
|
16
|
+
sessionId?: string;
|
|
11
17
|
}
|
|
@@ -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
|
|
|
5
6
|
/** Un movimiento del libro de inventario. */
|
|
@@ -12,6 +13,8 @@ export interface InventoryMovementEntry {
|
|
|
12
13
|
identifier: string | null;
|
|
13
14
|
occurredAt: string;
|
|
14
15
|
createdBy: string;
|
|
16
|
+
/** Motivo guardado en el MOV#; ausente en los tipos que no llevan motivo. */
|
|
17
|
+
reason?: InventoryMovementReasonEnum;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
/** Pieza de una tienda; status AVAILABLE, SOLD o DAMAGED. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HoldStockComponent } from '../requests/HoldStockRequest';
|
|
2
|
+
|
|
3
|
+
/** Response de privateHoldStock: la línea con las piezas que quedaron HELD. */
|
|
4
|
+
export interface HoldStockResponse {
|
|
5
|
+
lineId: string;
|
|
6
|
+
reservationId: string;
|
|
7
|
+
sessionId: string;
|
|
8
|
+
components: HoldStockComponent[];
|
|
9
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
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';
|
|
8
9
|
|
|
10
|
+
/** Componente de un kit en el catálogo de venta, con la categoría de su SKU. */
|
|
11
|
+
export interface StoreCatalogComponent extends ProductComponent {
|
|
12
|
+
category?: ProductCategoryEnum;
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
/** Fila por SKU del catálogo de venta de una tienda (privateGetStoreStockCatalog). */
|
|
10
16
|
export interface StoreCatalogItem {
|
|
11
17
|
sku: string;
|
|
@@ -13,6 +19,8 @@ export interface StoreCatalogItem {
|
|
|
13
19
|
available: number;
|
|
14
20
|
basePriceCents: number;
|
|
15
21
|
category: ProductCategoryEnum;
|
|
22
|
+
/** Solo en ACCESSORY. */
|
|
23
|
+
accessorySubcategory?: AccessorySubcategoryEnum;
|
|
16
24
|
trackingMode: TrackingModeEnum;
|
|
17
25
|
brand: string;
|
|
18
26
|
model: string;
|
|
@@ -25,7 +33,7 @@ export interface StoreCatalogItem {
|
|
|
25
33
|
mdmProvider: MdmProviderEnum | null;
|
|
26
34
|
mdmLockMode: MdmLockModeEnum | null;
|
|
27
35
|
/** Solo si es kit. */
|
|
28
|
-
components?:
|
|
36
|
+
components?: StoreCatalogComponent[];
|
|
29
37
|
/** Producto físico o servicio. Ausente = PRODUCT. */
|
|
30
38
|
itemType?: ItemTypeEnum;
|
|
31
39
|
/** 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 enum AccessorySubcategoryEnum {
|
|
3
|
+
AUDIO = 'AUDIO',
|
|
4
|
+
CHARGING = 'CHARGING',
|
|
5
|
+
PROTECTION = 'PROTECTION',
|
|
6
|
+
CABLES = 'CABLES',
|
|
7
|
+
WEARABLES = 'WEARABLES',
|
|
8
|
+
OTHER = 'OTHER',
|
|
9
|
+
}
|
|
@@ -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 enum InventoryItemStatusEnum {
|
|
14
15
|
AVAILABLE = 'AVAILABLE',
|
|
@@ -17,4 +18,5 @@ export enum InventoryItemStatusEnum {
|
|
|
17
18
|
RETURNED = 'RETURNED',
|
|
18
19
|
DAMAGED = 'DAMAGED',
|
|
19
20
|
IN_TRANSIT = 'IN_TRANSIT',
|
|
21
|
+
HELD = 'HELD',
|
|
20
22
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InventoryReturnMessage } from './InventoryReturnMessage';
|
|
2
|
+
import type { InventorySaleAppliedMessage } from './InventorySaleAppliedMessage';
|
|
3
|
+
|
|
4
|
+
/** Cualquier aviso de la cola de inventario; se discrimina por `type`. */
|
|
5
|
+
export type InventoryInboundMessage = InventorySaleAppliedMessage | InventoryReturnMessage;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Equals, IsISO8601, IsNotEmpty, IsString } from 'class-validator';
|
|
2
|
+
import { InventoryInboundMessageTypeEnum } from '../enums/InventoryInboundMessageTypeEnum';
|
|
3
|
+
import { ReturnStockRequest } from '../dtos/requests/ReturnStockRequest';
|
|
4
|
+
|
|
5
|
+
/** Aviso de devolución de una venta de la saga en la cola de inventario. */
|
|
6
|
+
export class InventoryReturnMessage extends ReturnStockRequest {
|
|
7
|
+
@Equals(InventoryInboundMessageTypeEnum.RETURN)
|
|
8
|
+
type!: InventoryInboundMessageTypeEnum.RETURN;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
@IsNotEmpty()
|
|
12
|
+
tenantId!: string;
|
|
13
|
+
|
|
14
|
+
@IsString()
|
|
15
|
+
@IsNotEmpty()
|
|
16
|
+
storeId!: string;
|
|
17
|
+
|
|
18
|
+
/** Sesión de la venta; ubica su marcador IDEMP#SELL. */
|
|
19
|
+
@IsString()
|
|
20
|
+
@IsNotEmpty()
|
|
21
|
+
sessionId!: string;
|
|
22
|
+
|
|
23
|
+
/** Fecha de la devolución; es el occurredAt del MOV#. */
|
|
24
|
+
@IsISO8601()
|
|
25
|
+
returnedAt!: string;
|
|
26
|
+
}
|