@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,83 @@
|
|
|
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.CreateSalePromotionRequest = 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 publicCreateSalePromotion. Nace en `DRAFT`; el retailer sale del token. */
|
|
19
|
+
class CreateSalePromotionRequest {
|
|
20
|
+
}
|
|
21
|
+
exports.CreateSalePromotionRequest = CreateSalePromotionRequest;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CreateSalePromotionRequest.prototype, "name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CreateSalePromotionRequest.prototype, "customerText", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
(0, class_validator_1.IsDefined)(),
|
|
36
|
+
(0, class_validator_1.ValidateNested)(),
|
|
37
|
+
(0, class_transformer_1.Type)(() => SalePromotionLeversInput_1.SalePromotionLeversInput),
|
|
38
|
+
__metadata("design:type", SalePromotionLeversInput_1.SalePromotionLeversInput)
|
|
39
|
+
], CreateSalePromotionRequest.prototype, "levers", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.ValidateNested)(),
|
|
44
|
+
(0, class_transformer_1.Type)(() => SalePromotionScopeInput_1.SalePromotionScopeInput),
|
|
45
|
+
__metadata("design:type", SalePromotionScopeInput_1.SalePromotionScopeInput)
|
|
46
|
+
], CreateSalePromotionRequest.prototype, "scope", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
(0, class_validator_1.ValidateNested)(),
|
|
51
|
+
(0, class_transformer_1.Type)(() => SalePromotionScopeInput_1.SalePromotionSegmentationInput),
|
|
52
|
+
__metadata("design:type", SalePromotionScopeInput_1.SalePromotionSegmentationInput)
|
|
53
|
+
], CreateSalePromotionRequest.prototype, "segmentation", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
(0, class_validator_1.IsOptional)(),
|
|
57
|
+
(0, class_validator_1.IsEnum)(PromotionAppliesToEnum_1.PromotionAppliesToEnum),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], CreateSalePromotionRequest.prototype, "appliesTo", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_transformer_1.Expose)(),
|
|
62
|
+
(0, class_validator_1.IsOptional)(),
|
|
63
|
+
(0, class_validator_1.IsInt)(),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], CreateSalePromotionRequest.prototype, "budgetMaxCents", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_transformer_1.Expose)(),
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
69
|
+
(0, class_validator_1.IsISO8601)(),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], CreateSalePromotionRequest.prototype, "validFrom", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_transformer_1.Expose)(),
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
(0, class_validator_1.IsISO8601)(),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], CreateSalePromotionRequest.prototype, "validUntil", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_transformer_1.Expose)(),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
(0, class_validator_1.IsBoolean)(),
|
|
82
|
+
__metadata("design:type", Boolean)
|
|
83
|
+
], CreateSalePromotionRequest.prototype, "oncePerCustomer", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DiscountTypeEnum } from '../../enums/DiscountTypeEnum';
|
|
2
|
+
/** Descuento en el body: exige el campo que corresponde al tipo. Rangos y signo los valida el lambda (422). */
|
|
3
|
+
export declare class DiscountValueInput {
|
|
4
|
+
type: DiscountTypeEnum;
|
|
5
|
+
amountCents?: number | null;
|
|
6
|
+
/** Puntos base: 1000 = 10%. */
|
|
7
|
+
percentBps?: number | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.DiscountValueInput = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const DiscountTypeEnum_1 = require("../../enums/DiscountTypeEnum");
|
|
16
|
+
/** Descuento en el body: exige el campo que corresponde al tipo. Rangos y signo los valida el lambda (422). */
|
|
17
|
+
class DiscountValueInput {
|
|
18
|
+
}
|
|
19
|
+
exports.DiscountValueInput = DiscountValueInput;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.IsEnum)(DiscountTypeEnum_1.DiscountTypeEnum),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], DiscountValueInput.prototype, "type", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.ValidateIf)((o) => o.type === DiscountTypeEnum_1.DiscountTypeEnum.AMOUNT),
|
|
28
|
+
(0, class_validator_1.IsInt)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], DiscountValueInput.prototype, "amountCents", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.ValidateIf)((o) => o.type === DiscountTypeEnum_1.DiscountTypeEnum.PERCENTAGE),
|
|
34
|
+
(0, class_validator_1.IsInt)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], DiscountValueInput.prototype, "percentBps", void 0);
|
|
@@ -0,0 +1,31 @@
|
|
|
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.EvaluateSalePromotionsRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Body de publicEvaluateSalePromotions; precios, líneas y cliente salen de la sesión. */
|
|
16
|
+
class EvaluateSalePromotionsRequest {
|
|
17
|
+
}
|
|
18
|
+
exports.EvaluateSalePromotionsRequest = EvaluateSalePromotionsRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], EvaluateSalePromotionsRequest.prototype, "sessionId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], EvaluateSalePromotionsRequest.prototype, "discountCode", void 0);
|
|
@@ -0,0 +1,25 @@
|
|
|
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.GetSaleCouponQuery = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Query de publicGetSaleCoupon (`GET /public/sales/{saleId}/coupon`). */
|
|
16
|
+
class GetSaleCouponQuery {
|
|
17
|
+
}
|
|
18
|
+
exports.GetSaleCouponQuery = GetSaleCouponQuery;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsOptional)(),
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], GetSaleCouponQuery.prototype, "sessionId", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body de publicHoldSalePromotion (PUT, `sessionId` en el path). `promotionId: null` = «Ninguna»;
|
|
3
|
+
* un PUT distinto reemplaza el apartado anterior.
|
|
4
|
+
*/
|
|
5
|
+
export declare class HoldSalePromotionRequest {
|
|
6
|
+
promotionId?: string | null;
|
|
7
|
+
promotionVersion?: number | null;
|
|
8
|
+
/** Regalos elegidos por el cliente, si la promo trae regalo. */
|
|
9
|
+
giftSkus?: string[] | null;
|
|
10
|
+
discountCode?: string | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.HoldSalePromotionRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Body de publicHoldSalePromotion (PUT, `sessionId` en el path). `promotionId: null` = «Ninguna»;
|
|
17
|
+
* un PUT distinto reemplaza el apartado anterior.
|
|
18
|
+
*/
|
|
19
|
+
class HoldSalePromotionRequest {
|
|
20
|
+
}
|
|
21
|
+
exports.HoldSalePromotionRequest = HoldSalePromotionRequest;
|
|
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
|
+
], HoldSalePromotionRequest.prototype, "promotionId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.ValidateIf)((o) => o.promotionId !== undefined && o.promotionId !== null),
|
|
32
|
+
(0, class_validator_1.IsInt)(),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], HoldSalePromotionRequest.prototype, "promotionVersion", 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
|
+
], HoldSalePromotionRequest.prototype, "giftSkus", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], HoldSalePromotionRequest.prototype, "discountCode", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CouponStatusEnum } from '../../enums/CouponStatusEnum';
|
|
2
|
+
import { DiscountCodeOriginEnum } from '../../enums/DiscountCodeOriginEnum';
|
|
3
|
+
import { DiscountCodeStatusEnum } from '../../enums/DiscountCodeStatusEnum';
|
|
4
|
+
/** Query de publicListDiscountCodes: códigos y cupones, filtrables por origen y estado. */
|
|
5
|
+
export declare class ListDiscountCodesQuery {
|
|
6
|
+
origin?: DiscountCodeOriginEnum;
|
|
7
|
+
status?: DiscountCodeStatusEnum | CouponStatusEnum;
|
|
8
|
+
limit?: number;
|
|
9
|
+
nextToken?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.ListDiscountCodesQuery = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const CouponStatusEnum_1 = require("../../enums/CouponStatusEnum");
|
|
16
|
+
const DiscountCodeOriginEnum_1 = require("../../enums/DiscountCodeOriginEnum");
|
|
17
|
+
const DiscountCodeStatusEnum_1 = require("../../enums/DiscountCodeStatusEnum");
|
|
18
|
+
const LISTABLE_STATUSES = [...new Set([...Object.values(DiscountCodeStatusEnum_1.DiscountCodeStatusEnum), ...Object.values(CouponStatusEnum_1.CouponStatusEnum)])];
|
|
19
|
+
/** Query de publicListDiscountCodes: códigos y cupones, filtrables por origen y estado. */
|
|
20
|
+
class ListDiscountCodesQuery {
|
|
21
|
+
}
|
|
22
|
+
exports.ListDiscountCodesQuery = ListDiscountCodesQuery;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
(0, class_validator_1.IsEnum)(DiscountCodeOriginEnum_1.DiscountCodeOriginEnum),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ListDiscountCodesQuery.prototype, "origin", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsIn)(LISTABLE_STATUSES),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ListDiscountCodesQuery.prototype, "status", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
39
|
+
(0, class_validator_1.IsInt)(),
|
|
40
|
+
(0, class_validator_1.Min)(1),
|
|
41
|
+
(0, class_validator_1.Max)(100),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], ListDiscountCodesQuery.prototype, "limit", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_transformer_1.Expose)(),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_validator_1.IsString)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], ListDiscountCodesQuery.prototype, "nextToken", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SalePromotionLogFormatEnum } from '../../enums/SalePromotionLogFormatEnum';
|
|
2
|
+
/** Query de publicListSalePromotionLog: global o de una promo; `CSV` exporta en vez de paginar. */
|
|
3
|
+
export declare class ListSalePromotionLogQuery {
|
|
4
|
+
promotionId?: string;
|
|
5
|
+
format?: SalePromotionLogFormatEnum;
|
|
6
|
+
limit?: number;
|
|
7
|
+
nextToken?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.ListSalePromotionLogQuery = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SalePromotionLogFormatEnum_1 = require("../../enums/SalePromotionLogFormatEnum");
|
|
16
|
+
/** Query de publicListSalePromotionLog: global o de una promo; `CSV` exporta en vez de paginar. */
|
|
17
|
+
class ListSalePromotionLogQuery {
|
|
18
|
+
}
|
|
19
|
+
exports.ListSalePromotionLogQuery = ListSalePromotionLogQuery;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ListSalePromotionLogQuery.prototype, "promotionId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_validator_1.IsEnum)(SalePromotionLogFormatEnum_1.SalePromotionLogFormatEnum),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ListSalePromotionLogQuery.prototype, "format", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
36
|
+
(0, class_validator_1.IsInt)(),
|
|
37
|
+
(0, class_validator_1.Min)(1),
|
|
38
|
+
(0, class_validator_1.Max)(100),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], ListSalePromotionLogQuery.prototype, "limit", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], ListSalePromotionLogQuery.prototype, "nextToken", void 0);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SalePromotionStatusEnum } from '../../enums/SalePromotionStatusEnum';
|
|
2
|
+
/** Query de publicListSalePromotions; sin `status` excluye las archivadas. */
|
|
3
|
+
export declare class ListSalePromotionsQuery {
|
|
4
|
+
status?: SalePromotionStatusEnum;
|
|
5
|
+
limit?: number;
|
|
6
|
+
nextToken?: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.ListSalePromotionsQuery = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SalePromotionStatusEnum_1 = require("../../enums/SalePromotionStatusEnum");
|
|
16
|
+
/** Query de publicListSalePromotions; sin `status` excluye las archivadas. */
|
|
17
|
+
class ListSalePromotionsQuery {
|
|
18
|
+
}
|
|
19
|
+
exports.ListSalePromotionsQuery = ListSalePromotionsQuery;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, class_validator_1.IsEnum)(SalePromotionStatusEnum_1.SalePromotionStatusEnum),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ListSalePromotionsQuery.prototype, "status", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
30
|
+
(0, class_validator_1.IsInt)(),
|
|
31
|
+
(0, class_validator_1.Min)(1),
|
|
32
|
+
(0, class_validator_1.Max)(100),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], ListSalePromotionsQuery.prototype, "limit", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ListSalePromotionsQuery.prototype, "nextToken", void 0);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ListStoreSalePromotionsQuery = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Query de publicListStoreSalePromotions; la tienda sale de la sesión, no del request. */
|
|
16
|
+
class ListStoreSalePromotionsQuery {
|
|
17
|
+
}
|
|
18
|
+
exports.ListStoreSalePromotionsQuery = ListStoreSalePromotionsQuery;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ListStoreSalePromotionsQuery.prototype, "sessionId", void 0);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AccessorySubcategoryEnum } from '../../../retailCatalog/enums/AccessorySubcategoryEnum';
|
|
2
|
+
import { CouponScopeEnum } from '../../enums/CouponScopeEnum';
|
|
3
|
+
import { GiftModeEnum } from '../../enums/GiftModeEnum';
|
|
4
|
+
import { DiscountValueInput } from './DiscountValueInput';
|
|
5
|
+
export declare class AccessoryDiscountLeverInput {
|
|
6
|
+
percentBps: number;
|
|
7
|
+
maxAmountCents?: number | null;
|
|
8
|
+
}
|
|
9
|
+
/** Regalo por lista exige `skus`; por gama exige `accessorySubcategory` y `maxPriceCents`. */
|
|
10
|
+
export declare class GiftLeverInput {
|
|
11
|
+
mode: GiftModeEnum;
|
|
12
|
+
skus?: string[] | null;
|
|
13
|
+
accessorySubcategory?: AccessorySubcategoryEnum | null;
|
|
14
|
+
maxPriceCents?: number | null;
|
|
15
|
+
chooseCount: number;
|
|
16
|
+
}
|
|
17
|
+
export declare class CouponLeverInput extends DiscountValueInput {
|
|
18
|
+
validityDays: number;
|
|
19
|
+
scope: CouponScopeEnum;
|
|
20
|
+
}
|
|
21
|
+
export declare class AirtimeLeverInput {
|
|
22
|
+
rechargeCount: number;
|
|
23
|
+
rechargeAmountCents: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class ExtendedWarrantyLeverInput {
|
|
26
|
+
extraMonths: number;
|
|
27
|
+
costCents: number;
|
|
28
|
+
}
|
|
29
|
+
export declare class WalletBonusLeverInput {
|
|
30
|
+
amountCents: number;
|
|
31
|
+
}
|
|
32
|
+
/** Las 7 palancas en el body; que venga al menos una lo valida el lambda (422). */
|
|
33
|
+
export declare class SalePromotionLeversInput {
|
|
34
|
+
deviceDiscount?: DiscountValueInput | null;
|
|
35
|
+
accessoryDiscount?: AccessoryDiscountLeverInput | null;
|
|
36
|
+
gift?: GiftLeverInput | null;
|
|
37
|
+
coupon?: CouponLeverInput | null;
|
|
38
|
+
airtime?: AirtimeLeverInput | null;
|
|
39
|
+
extendedWarranty?: ExtendedWarrantyLeverInput | null;
|
|
40
|
+
walletBonus?: WalletBonusLeverInput | null;
|
|
41
|
+
}
|