@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,166 @@
|
|
|
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.SalePromotionLeversInput = exports.WalletBonusLeverInput = exports.ExtendedWarrantyLeverInput = exports.AirtimeLeverInput = exports.CouponLeverInput = exports.GiftLeverInput = exports.AccessoryDiscountLeverInput = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const AccessorySubcategoryEnum_1 = require("../../../retailCatalog/enums/AccessorySubcategoryEnum");
|
|
16
|
+
const CouponScopeEnum_1 = require("../../enums/CouponScopeEnum");
|
|
17
|
+
const GiftModeEnum_1 = require("../../enums/GiftModeEnum");
|
|
18
|
+
const DiscountValueInput_1 = require("./DiscountValueInput");
|
|
19
|
+
class AccessoryDiscountLeverInput {
|
|
20
|
+
}
|
|
21
|
+
exports.AccessoryDiscountLeverInput = AccessoryDiscountLeverInput;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.IsInt)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], AccessoryDiscountLeverInput.prototype, "percentBps", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, class_validator_1.IsInt)(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], AccessoryDiscountLeverInput.prototype, "maxAmountCents", void 0);
|
|
33
|
+
/** Regalo por lista exige `skus`; por gama exige `accessorySubcategory` y `maxPriceCents`. */
|
|
34
|
+
class GiftLeverInput {
|
|
35
|
+
}
|
|
36
|
+
exports.GiftLeverInput = GiftLeverInput;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, class_validator_1.IsEnum)(GiftModeEnum_1.GiftModeEnum),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], GiftLeverInput.prototype, "mode", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
(0, class_validator_1.ValidateIf)((o) => o.mode === GiftModeEnum_1.GiftModeEnum.LIST),
|
|
45
|
+
(0, class_validator_1.IsArray)(),
|
|
46
|
+
(0, class_validator_1.ArrayNotEmpty)(),
|
|
47
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
48
|
+
__metadata("design:type", Array)
|
|
49
|
+
], GiftLeverInput.prototype, "skus", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
(0, class_validator_1.ValidateIf)((o) => o.mode === GiftModeEnum_1.GiftModeEnum.RANGE),
|
|
53
|
+
(0, class_validator_1.IsEnum)(AccessorySubcategoryEnum_1.AccessorySubcategoryEnum),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], GiftLeverInput.prototype, "accessorySubcategory", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_transformer_1.Expose)(),
|
|
58
|
+
(0, class_validator_1.ValidateIf)((o) => o.mode === GiftModeEnum_1.GiftModeEnum.RANGE),
|
|
59
|
+
(0, class_validator_1.IsInt)(),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], GiftLeverInput.prototype, "maxPriceCents", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
(0, class_validator_1.IsInt)(),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], GiftLeverInput.prototype, "chooseCount", void 0);
|
|
67
|
+
class CouponLeverInput extends DiscountValueInput_1.DiscountValueInput {
|
|
68
|
+
}
|
|
69
|
+
exports.CouponLeverInput = CouponLeverInput;
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_transformer_1.Expose)(),
|
|
72
|
+
(0, class_validator_1.IsInt)(),
|
|
73
|
+
__metadata("design:type", Number)
|
|
74
|
+
], CouponLeverInput.prototype, "validityDays", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_transformer_1.Expose)(),
|
|
77
|
+
(0, class_validator_1.IsEnum)(CouponScopeEnum_1.CouponScopeEnum),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], CouponLeverInput.prototype, "scope", void 0);
|
|
80
|
+
class AirtimeLeverInput {
|
|
81
|
+
}
|
|
82
|
+
exports.AirtimeLeverInput = AirtimeLeverInput;
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_transformer_1.Expose)(),
|
|
85
|
+
(0, class_validator_1.IsInt)(),
|
|
86
|
+
__metadata("design:type", Number)
|
|
87
|
+
], AirtimeLeverInput.prototype, "rechargeCount", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_transformer_1.Expose)(),
|
|
90
|
+
(0, class_validator_1.IsInt)(),
|
|
91
|
+
__metadata("design:type", Number)
|
|
92
|
+
], AirtimeLeverInput.prototype, "rechargeAmountCents", void 0);
|
|
93
|
+
class ExtendedWarrantyLeverInput {
|
|
94
|
+
}
|
|
95
|
+
exports.ExtendedWarrantyLeverInput = ExtendedWarrantyLeverInput;
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, class_transformer_1.Expose)(),
|
|
98
|
+
(0, class_validator_1.IsInt)(),
|
|
99
|
+
__metadata("design:type", Number)
|
|
100
|
+
], ExtendedWarrantyLeverInput.prototype, "extraMonths", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, class_transformer_1.Expose)(),
|
|
103
|
+
(0, class_validator_1.IsInt)(),
|
|
104
|
+
__metadata("design:type", Number)
|
|
105
|
+
], ExtendedWarrantyLeverInput.prototype, "costCents", void 0);
|
|
106
|
+
class WalletBonusLeverInput {
|
|
107
|
+
}
|
|
108
|
+
exports.WalletBonusLeverInput = WalletBonusLeverInput;
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_transformer_1.Expose)(),
|
|
111
|
+
(0, class_validator_1.IsInt)(),
|
|
112
|
+
__metadata("design:type", Number)
|
|
113
|
+
], WalletBonusLeverInput.prototype, "amountCents", void 0);
|
|
114
|
+
/** Las 7 palancas en el body; que venga al menos una lo valida el lambda (422). */
|
|
115
|
+
class SalePromotionLeversInput {
|
|
116
|
+
}
|
|
117
|
+
exports.SalePromotionLeversInput = SalePromotionLeversInput;
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, class_transformer_1.Expose)(),
|
|
120
|
+
(0, class_validator_1.IsOptional)(),
|
|
121
|
+
(0, class_validator_1.ValidateNested)(),
|
|
122
|
+
(0, class_transformer_1.Type)(() => DiscountValueInput_1.DiscountValueInput),
|
|
123
|
+
__metadata("design:type", DiscountValueInput_1.DiscountValueInput)
|
|
124
|
+
], SalePromotionLeversInput.prototype, "deviceDiscount", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_transformer_1.Expose)(),
|
|
127
|
+
(0, class_validator_1.IsOptional)(),
|
|
128
|
+
(0, class_validator_1.ValidateNested)(),
|
|
129
|
+
(0, class_transformer_1.Type)(() => AccessoryDiscountLeverInput),
|
|
130
|
+
__metadata("design:type", AccessoryDiscountLeverInput)
|
|
131
|
+
], SalePromotionLeversInput.prototype, "accessoryDiscount", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, class_transformer_1.Expose)(),
|
|
134
|
+
(0, class_validator_1.IsOptional)(),
|
|
135
|
+
(0, class_validator_1.ValidateNested)(),
|
|
136
|
+
(0, class_transformer_1.Type)(() => GiftLeverInput),
|
|
137
|
+
__metadata("design:type", GiftLeverInput)
|
|
138
|
+
], SalePromotionLeversInput.prototype, "gift", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, class_transformer_1.Expose)(),
|
|
141
|
+
(0, class_validator_1.IsOptional)(),
|
|
142
|
+
(0, class_validator_1.ValidateNested)(),
|
|
143
|
+
(0, class_transformer_1.Type)(() => CouponLeverInput),
|
|
144
|
+
__metadata("design:type", CouponLeverInput)
|
|
145
|
+
], SalePromotionLeversInput.prototype, "coupon", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, class_transformer_1.Expose)(),
|
|
148
|
+
(0, class_validator_1.IsOptional)(),
|
|
149
|
+
(0, class_validator_1.ValidateNested)(),
|
|
150
|
+
(0, class_transformer_1.Type)(() => AirtimeLeverInput),
|
|
151
|
+
__metadata("design:type", AirtimeLeverInput)
|
|
152
|
+
], SalePromotionLeversInput.prototype, "airtime", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, class_transformer_1.Expose)(),
|
|
155
|
+
(0, class_validator_1.IsOptional)(),
|
|
156
|
+
(0, class_validator_1.ValidateNested)(),
|
|
157
|
+
(0, class_transformer_1.Type)(() => ExtendedWarrantyLeverInput),
|
|
158
|
+
__metadata("design:type", ExtendedWarrantyLeverInput)
|
|
159
|
+
], SalePromotionLeversInput.prototype, "extendedWarranty", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, class_transformer_1.Expose)(),
|
|
162
|
+
(0, class_validator_1.IsOptional)(),
|
|
163
|
+
(0, class_validator_1.ValidateNested)(),
|
|
164
|
+
(0, class_transformer_1.Type)(() => WalletBonusLeverInput),
|
|
165
|
+
__metadata("design:type", WalletBonusLeverInput)
|
|
166
|
+
], SalePromotionLeversInput.prototype, "walletBonus", void 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ProductCategoryEnum } from '../../../retailCatalog/enums/ProductCategoryEnum';
|
|
2
|
+
import { ProductTierEnum } from '../../../retailCatalog/enums/ProductTierEnum';
|
|
3
|
+
/** Alcance en el body; cada lista ausente o `null` = sin restricción. */
|
|
4
|
+
export declare class SalePromotionScopeInput {
|
|
5
|
+
productCategories?: ProductCategoryEnum[] | null;
|
|
6
|
+
tiers?: ProductTierEnum[] | null;
|
|
7
|
+
skus?: string[] | null;
|
|
8
|
+
storeIds?: string[] | null;
|
|
9
|
+
}
|
|
10
|
+
/** Segmentación en el body: segmentos de loan-offerings y si exige crédito SK activo. */
|
|
11
|
+
export declare class SalePromotionSegmentationInput {
|
|
12
|
+
segmentIds?: string[] | null;
|
|
13
|
+
requiresActiveSurekeepCredit?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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.SalePromotionSegmentationInput = exports.SalePromotionScopeInput = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const ProductCategoryEnum_1 = require("../../../retailCatalog/enums/ProductCategoryEnum");
|
|
16
|
+
const ProductTierEnum_1 = require("../../../retailCatalog/enums/ProductTierEnum");
|
|
17
|
+
/** Alcance en el body; cada lista ausente o `null` = sin restricción. */
|
|
18
|
+
class SalePromotionScopeInput {
|
|
19
|
+
}
|
|
20
|
+
exports.SalePromotionScopeInput = SalePromotionScopeInput;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
(0, class_validator_1.IsArray)(),
|
|
25
|
+
(0, class_validator_1.IsEnum)(ProductCategoryEnum_1.ProductCategoryEnum, { each: true }),
|
|
26
|
+
__metadata("design:type", Array)
|
|
27
|
+
], SalePromotionScopeInput.prototype, "productCategories", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsArray)(),
|
|
32
|
+
(0, class_validator_1.IsEnum)(ProductTierEnum_1.ProductTierEnum, { each: true }),
|
|
33
|
+
__metadata("design:type", Array)
|
|
34
|
+
], SalePromotionScopeInput.prototype, "tiers", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.IsArray)(),
|
|
39
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], SalePromotionScopeInput.prototype, "skus", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, class_validator_1.IsArray)(),
|
|
46
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
47
|
+
__metadata("design:type", Array)
|
|
48
|
+
], SalePromotionScopeInput.prototype, "storeIds", void 0);
|
|
49
|
+
/** Segmentación en el body: segmentos de loan-offerings y si exige crédito SK activo. */
|
|
50
|
+
class SalePromotionSegmentationInput {
|
|
51
|
+
}
|
|
52
|
+
exports.SalePromotionSegmentationInput = SalePromotionSegmentationInput;
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_transformer_1.Expose)(),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, class_validator_1.IsArray)(),
|
|
57
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
58
|
+
__metadata("design:type", Array)
|
|
59
|
+
], SalePromotionSegmentationInput.prototype, "segmentIds", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_transformer_1.Expose)(),
|
|
62
|
+
(0, class_validator_1.IsOptional)(),
|
|
63
|
+
(0, class_validator_1.IsBoolean)(),
|
|
64
|
+
__metadata("design:type", Boolean)
|
|
65
|
+
], SalePromotionSegmentationInput.prototype, "requiresActiveSurekeepCredit", void 0);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PromotionAppliesToEnum } from '../../enums/PromotionAppliesToEnum';
|
|
2
|
+
import { SalePromotionLeversInput } from './SalePromotionLeversInput';
|
|
3
|
+
import { SalePromotionScopeInput, SalePromotionSegmentationInput } from './SalePromotionScopeInput';
|
|
4
|
+
/** Body de publicUpdateSalePromotion: parche; el lambda crea una versión nueva para ventas futuras. */
|
|
5
|
+
export declare class UpdateSalePromotionRequest {
|
|
6
|
+
name?: string;
|
|
7
|
+
customerText?: string;
|
|
8
|
+
levers?: SalePromotionLeversInput;
|
|
9
|
+
scope?: SalePromotionScopeInput | null;
|
|
10
|
+
segmentation?: SalePromotionSegmentationInput | null;
|
|
11
|
+
/** Ausente = conserva el valor actual. */
|
|
12
|
+
appliesTo?: PromotionAppliesToEnum;
|
|
13
|
+
/** `null` = sin tope. */
|
|
14
|
+
budgetMaxCents?: number | null;
|
|
15
|
+
validFrom?: string | null;
|
|
16
|
+
/** `null` = permanente. */
|
|
17
|
+
validUntil?: string | null;
|
|
18
|
+
oncePerCustomer?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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.UpdateSalePromotionRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const PromotionAppliesToEnum_1 = require("../../enums/PromotionAppliesToEnum");
|
|
16
|
+
const SalePromotionLeversInput_1 = require("./SalePromotionLeversInput");
|
|
17
|
+
const SalePromotionScopeInput_1 = require("./SalePromotionScopeInput");
|
|
18
|
+
/** Body de publicUpdateSalePromotion: parche; el lambda crea una versión nueva para ventas futuras. */
|
|
19
|
+
class UpdateSalePromotionRequest {
|
|
20
|
+
}
|
|
21
|
+
exports.UpdateSalePromotionRequest = UpdateSalePromotionRequest;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], UpdateSalePromotionRequest.prototype, "name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], UpdateSalePromotionRequest.prototype, "customerText", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.ValidateNested)(),
|
|
39
|
+
(0, class_transformer_1.Type)(() => SalePromotionLeversInput_1.SalePromotionLeversInput),
|
|
40
|
+
__metadata("design:type", SalePromotionLeversInput_1.SalePromotionLeversInput)
|
|
41
|
+
], UpdateSalePromotionRequest.prototype, "levers", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, class_validator_1.ValidateNested)(),
|
|
46
|
+
(0, class_transformer_1.Type)(() => SalePromotionScopeInput_1.SalePromotionScopeInput),
|
|
47
|
+
__metadata("design:type", SalePromotionScopeInput_1.SalePromotionScopeInput)
|
|
48
|
+
], UpdateSalePromotionRequest.prototype, "scope", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_transformer_1.Expose)(),
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
(0, class_validator_1.ValidateNested)(),
|
|
53
|
+
(0, class_transformer_1.Type)(() => SalePromotionScopeInput_1.SalePromotionSegmentationInput),
|
|
54
|
+
__metadata("design:type", SalePromotionScopeInput_1.SalePromotionSegmentationInput)
|
|
55
|
+
], UpdateSalePromotionRequest.prototype, "segmentation", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_transformer_1.Expose)(),
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
(0, class_validator_1.IsEnum)(PromotionAppliesToEnum_1.PromotionAppliesToEnum),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], UpdateSalePromotionRequest.prototype, "appliesTo", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsInt)(),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], UpdateSalePromotionRequest.prototype, "budgetMaxCents", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_transformer_1.Expose)(),
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
(0, class_validator_1.IsISO8601)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], UpdateSalePromotionRequest.prototype, "validFrom", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
(0, class_validator_1.IsISO8601)(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], UpdateSalePromotionRequest.prototype, "validUntil", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_transformer_1.Expose)(),
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, class_validator_1.IsBoolean)(),
|
|
84
|
+
__metadata("design:type", Boolean)
|
|
85
|
+
], UpdateSalePromotionRequest.prototype, "oncePerCustomer", void 0);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DiscountCode } from '../DiscountCode';
|
|
2
|
+
export type CreateDiscountCodeResponse = DiscountCode;
|
|
3
|
+
export type ChangeDiscountCodeStatusResponse = DiscountCode;
|
|
4
|
+
export interface ListDiscountCodesResponse {
|
|
5
|
+
items: DiscountCode[];
|
|
6
|
+
nextToken: string | null;
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SalePromotion } from '../SalePromotion';
|
|
2
|
+
import { SalePromotionLogEntry } from '../SalePromotionLogEntry';
|
|
3
|
+
export type CreateSalePromotionResponse = SalePromotion;
|
|
4
|
+
export type GetSalePromotionResponse = SalePromotion;
|
|
5
|
+
export type UpdateSalePromotionResponse = SalePromotion;
|
|
6
|
+
export type ChangeSalePromotionStatusResponse = SalePromotion;
|
|
7
|
+
/** Fila del listado de Admin VL: la promo más sus canjes de los últimos 30 días. */
|
|
8
|
+
export interface SalePromotionListItem extends SalePromotion {
|
|
9
|
+
redemptionsLast30Days: number;
|
|
10
|
+
}
|
|
11
|
+
/** KPIs de la cabecera de «Promos venta». */
|
|
12
|
+
export interface SalePromotionKpis {
|
|
13
|
+
activeCount: number;
|
|
14
|
+
expiringIn7DaysCount: number;
|
|
15
|
+
scheduledCount: number;
|
|
16
|
+
pausedCount: number;
|
|
17
|
+
redemptionsLast30Days: number;
|
|
18
|
+
/** Presupuesto consumido sobre el tope, en puntos base, de las promos con tope (`computeBudgetUsedBps`); `null` si ninguna tiene. */
|
|
19
|
+
budgetUsedBps: number | null;
|
|
20
|
+
}
|
|
21
|
+
export interface ListSalePromotionsResponse {
|
|
22
|
+
items: SalePromotionListItem[];
|
|
23
|
+
kpis: SalePromotionKpis;
|
|
24
|
+
nextToken: string | null;
|
|
25
|
+
}
|
|
26
|
+
/** Página JSON del historial; con `format=CSV` el endpoint responde `text/csv`. */
|
|
27
|
+
export interface ListSalePromotionLogResponse {
|
|
28
|
+
items: SalePromotionLogEntry[];
|
|
29
|
+
nextToken: string | null;
|
|
30
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { CouponScopeEnum } from '../../enums/CouponScopeEnum';
|
|
2
|
+
import { CouponStatusEnum } from '../../enums/CouponStatusEnum';
|
|
3
|
+
import { EntitlementKindEnum } from '../../enums/EntitlementKindEnum';
|
|
4
|
+
import { EntitlementStateEnum } from '../../enums/EntitlementStateEnum';
|
|
5
|
+
import { RetailPromotionsErrorCodeEnum } from '../../enums/RetailPromotionsErrorCodeEnum';
|
|
6
|
+
import { SaleCouponAvailabilityEnum } from '../../enums/SaleCouponAvailabilityEnum';
|
|
7
|
+
import { SalePromotionLeverEnum } from '../../enums/SalePromotionLeverEnum';
|
|
8
|
+
import { DiscountValue } from '../DiscountValue';
|
|
9
|
+
import { LinePromotionDiscount } from '../LinePromotionDiscount';
|
|
10
|
+
import { SalePromotionLevers, SalePromotionScope } from '../SalePromotionLevers';
|
|
11
|
+
/** Promo vigente en la tienda de la sesión, para los chips de «Elige el teléfono». */
|
|
12
|
+
export interface StoreSalePromotionItem {
|
|
13
|
+
promotionId: string;
|
|
14
|
+
version: number;
|
|
15
|
+
name: string;
|
|
16
|
+
customerText: string;
|
|
17
|
+
levers: SalePromotionLevers;
|
|
18
|
+
/** Para cruzar con cada equipo; todo `null` = fila «Toda la tienda». */
|
|
19
|
+
scope: SalePromotionScope;
|
|
20
|
+
}
|
|
21
|
+
export interface ListStoreSalePromotionsResponse {
|
|
22
|
+
items: StoreSalePromotionItem[];
|
|
23
|
+
}
|
|
24
|
+
/** Opción de regalo con su existencia en la tienda; sin existencia se muestra en gris. */
|
|
25
|
+
export interface GiftOption {
|
|
26
|
+
sku: string;
|
|
27
|
+
name: string;
|
|
28
|
+
listPriceCents: number;
|
|
29
|
+
inStock: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Lo que se entrega al cerrar («Después en la venta»). `quantity`: recargas o meses de garantía. */
|
|
32
|
+
export interface AfterSaleBenefit {
|
|
33
|
+
lever: SalePromotionLeverEnum;
|
|
34
|
+
amountCents: number | null;
|
|
35
|
+
quantity: number | null;
|
|
36
|
+
}
|
|
37
|
+
/** Promo que aplica a la sesión, con el desglose que tendría al apartarla. */
|
|
38
|
+
export interface EvaluatedSalePromotion {
|
|
39
|
+
promotionId: string;
|
|
40
|
+
version: number;
|
|
41
|
+
name: string;
|
|
42
|
+
customerText: string;
|
|
43
|
+
levers: SalePromotionLeverEnum[];
|
|
44
|
+
lines: LinePromotionDiscount[];
|
|
45
|
+
totalDiscountCents: number;
|
|
46
|
+
giftOptions: GiftOption[];
|
|
47
|
+
giftChooseCount: number | null;
|
|
48
|
+
afterSale: AfterSaleBenefit[];
|
|
49
|
+
}
|
|
50
|
+
/** Resultado del código tecleado: si no aplica, `rejectionCode` dice por qué. */
|
|
51
|
+
export interface EvaluatedDiscountCode {
|
|
52
|
+
codeText: string;
|
|
53
|
+
applicable: boolean;
|
|
54
|
+
rejectionCode: RetailPromotionsErrorCodeEnum | null;
|
|
55
|
+
lines: LinePromotionDiscount[];
|
|
56
|
+
totalDiscountCents: number;
|
|
57
|
+
}
|
|
58
|
+
export interface EvaluateSalePromotionsResponse {
|
|
59
|
+
promotions: EvaluatedSalePromotion[];
|
|
60
|
+
discountCode: EvaluatedDiscountCode | null;
|
|
61
|
+
}
|
|
62
|
+
/** Lo que quedó apartado y escrito en la sesión. */
|
|
63
|
+
export interface HoldSalePromotionResponse {
|
|
64
|
+
sessionId: string;
|
|
65
|
+
promotionId: string | null;
|
|
66
|
+
promotionVersion: number | null;
|
|
67
|
+
discountCode: string | null;
|
|
68
|
+
giftSkus: string[];
|
|
69
|
+
lines: LinePromotionDiscount[];
|
|
70
|
+
totalDiscountCents: number;
|
|
71
|
+
}
|
|
72
|
+
/** `released: false` = no había apartado; soltar es idempotente. */
|
|
73
|
+
export interface ReleaseSalePromotionResponse {
|
|
74
|
+
sessionId: string;
|
|
75
|
+
released: boolean;
|
|
76
|
+
}
|
|
77
|
+
/** Respuesta del privado que llama el wizard al cancelar la sesión o la venta. */
|
|
78
|
+
export interface PrivateReleaseSalePromotionResponse {
|
|
79
|
+
sessionId: string;
|
|
80
|
+
released: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface SaleCoupon {
|
|
83
|
+
codeText: string;
|
|
84
|
+
discount: DiscountValue;
|
|
85
|
+
validUntil: string;
|
|
86
|
+
scope: CouponScopeEnum;
|
|
87
|
+
status: CouponStatusEnum;
|
|
88
|
+
}
|
|
89
|
+
/** Entrega posterior a la venta. `quantity`: recargas o meses de garantía. */
|
|
90
|
+
export interface SaleEntitlement {
|
|
91
|
+
kind: EntitlementKindEnum;
|
|
92
|
+
state: EntitlementStateEnum;
|
|
93
|
+
amountCents: number | null;
|
|
94
|
+
quantity: number | null;
|
|
95
|
+
}
|
|
96
|
+
/** Cupón y «lo que se lleva» de una venta cerrada (publicGetSaleCoupon). */
|
|
97
|
+
export interface GetSaleCouponResponse {
|
|
98
|
+
saleId: string;
|
|
99
|
+
availability: SaleCouponAvailabilityEnum;
|
|
100
|
+
coupon: SaleCoupon | null;
|
|
101
|
+
entitlements: SaleEntitlement[];
|
|
102
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dónde vale el cupón que emite la venta.
|
|
3
|
+
* @enum {string}
|
|
4
|
+
*/
|
|
5
|
+
export declare enum CouponScopeEnum {
|
|
6
|
+
/** Toda la cadena del retailer. */
|
|
7
|
+
CHAIN = "CHAIN",
|
|
8
|
+
ISSUING_STORE = "ISSUING_STORE",
|
|
9
|
+
/** Las tiendas del alcance de la promo que lo emitió. */
|
|
10
|
+
PROMOTION_STORES = "PROMOTION_STORES"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CouponScopeEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Dónde vale el cupón que emite la venta.
|
|
6
|
+
* @enum {string}
|
|
7
|
+
*/
|
|
8
|
+
var CouponScopeEnum;
|
|
9
|
+
(function (CouponScopeEnum) {
|
|
10
|
+
/** Toda la cadena del retailer. */
|
|
11
|
+
CouponScopeEnum["CHAIN"] = "CHAIN";
|
|
12
|
+
CouponScopeEnum["ISSUING_STORE"] = "ISSUING_STORE";
|
|
13
|
+
/** Las tiendas del alcance de la promo que lo emitió. */
|
|
14
|
+
CouponScopeEnum["PROMOTION_STORES"] = "PROMOTION_STORES";
|
|
15
|
+
})(CouponScopeEnum || (exports.CouponScopeEnum = CouponScopeEnum = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado del cupón emitido por una venta. `USED` puede volver a `ACTIVE` o `EXPIRED` si se
|
|
3
|
+
* cancela la venta donde se canjeó.
|
|
4
|
+
* @enum {string}
|
|
5
|
+
*/
|
|
6
|
+
export declare enum CouponStatusEnum {
|
|
7
|
+
ACTIVE = "ACTIVE",
|
|
8
|
+
USED = "USED",
|
|
9
|
+
EXPIRED = "EXPIRED",
|
|
10
|
+
VOIDED = "VOIDED"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CouponStatusEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Estado del cupón emitido por una venta. `USED` puede volver a `ACTIVE` o `EXPIRED` si se
|
|
6
|
+
* cancela la venta donde se canjeó.
|
|
7
|
+
* @enum {string}
|
|
8
|
+
*/
|
|
9
|
+
var CouponStatusEnum;
|
|
10
|
+
(function (CouponStatusEnum) {
|
|
11
|
+
CouponStatusEnum["ACTIVE"] = "ACTIVE";
|
|
12
|
+
CouponStatusEnum["USED"] = "USED";
|
|
13
|
+
CouponStatusEnum["EXPIRED"] = "EXPIRED";
|
|
14
|
+
CouponStatusEnum["VOIDED"] = "VOIDED";
|
|
15
|
+
})(CouponStatusEnum || (exports.CouponStatusEnum = CouponStatusEnum = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiscountCodeOriginEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Origen de un código: creado por Admin VL o cupón emitido por una venta.
|
|
6
|
+
* @enum {string}
|
|
7
|
+
*/
|
|
8
|
+
var DiscountCodeOriginEnum;
|
|
9
|
+
(function (DiscountCodeOriginEnum) {
|
|
10
|
+
DiscountCodeOriginEnum["ADMIN"] = "ADMIN";
|
|
11
|
+
DiscountCodeOriginEnum["SALE_COUPON"] = "SALE_COUPON";
|
|
12
|
+
})(DiscountCodeOriginEnum || (exports.DiscountCodeOriginEnum = DiscountCodeOriginEnum = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado de un código de descuento creado en Admin VL.
|
|
3
|
+
* @enum {string}
|
|
4
|
+
*/
|
|
5
|
+
export declare enum DiscountCodeStatusEnum {
|
|
6
|
+
ACTIVE = "ACTIVE",
|
|
7
|
+
/** Llegó a sus usos totales. */
|
|
8
|
+
EXHAUSTED = "EXHAUSTED",
|
|
9
|
+
EXPIRED = "EXPIRED",
|
|
10
|
+
VOIDED = "VOIDED"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiscountCodeStatusEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Estado de un código de descuento creado en Admin VL.
|
|
6
|
+
* @enum {string}
|
|
7
|
+
*/
|
|
8
|
+
var DiscountCodeStatusEnum;
|
|
9
|
+
(function (DiscountCodeStatusEnum) {
|
|
10
|
+
DiscountCodeStatusEnum["ACTIVE"] = "ACTIVE";
|
|
11
|
+
/** Llegó a sus usos totales. */
|
|
12
|
+
DiscountCodeStatusEnum["EXHAUSTED"] = "EXHAUSTED";
|
|
13
|
+
DiscountCodeStatusEnum["EXPIRED"] = "EXPIRED";
|
|
14
|
+
DiscountCodeStatusEnum["VOIDED"] = "VOIDED";
|
|
15
|
+
})(DiscountCodeStatusEnum || (exports.DiscountCodeStatusEnum = DiscountCodeStatusEnum = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiscountCodeTransitionEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Acción de Admin VL sobre un código o cupón. Hoy solo anular.
|
|
6
|
+
* @enum {string}
|
|
7
|
+
*/
|
|
8
|
+
var DiscountCodeTransitionEnum;
|
|
9
|
+
(function (DiscountCodeTransitionEnum) {
|
|
10
|
+
DiscountCodeTransitionEnum["VOID"] = "VOID";
|
|
11
|
+
})(DiscountCodeTransitionEnum || (exports.DiscountCodeTransitionEnum = DiscountCodeTransitionEnum = {}));
|