@fiado/type-kit 3.499.0 → 3.501.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/cognitoBackofficeConnector/dtos/AuthStartLogin.test.ts +76 -0
- package/_test_/unit/platformRbac/auth/dtos.test.ts +33 -0
- package/_test_/unit/platformRbac/enums/ChallengeNameEnum.test.ts +17 -0
- package/_test_/unit/retailPromotions/constants.test.ts +1 -1
- package/_test_/unit/retailPromotions/evaluatedSalePromotion.test.ts +2 -0
- package/_test_/unit/retailPromotions/resolveSalePromotionKind.test.ts +2 -0
- package/_test_/unit/retailPromotions/salePromotionConditions.test.ts +4 -0
- package/_test_/unit/retailPromotions/stackablePromotions.test.ts +238 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthStartLoginRequest.d.ts +13 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthStartLoginRequest.js +53 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthStartLoginResponse.d.ts +22 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthStartLoginResponse.js +79 -0
- package/bin/cognitoBackofficeConnector/index.d.ts +2 -0
- package/bin/cognitoBackofficeConnector/index.js +2 -0
- package/bin/platformRbac/auth/DefineNextChallengeRequest.d.ts +1 -0
- package/bin/platformRbac/auth/DefineNextChallengeRequest.js +5 -0
- package/bin/platformRbac/enums/ChallengeNameEnum.d.ts +3 -1
- package/bin/platformRbac/enums/ChallengeNameEnum.js +4 -0
- package/bin/retailPromotions/constants/retailPromotionsErrorHttpStatus.js +1 -0
- package/bin/retailPromotions/dtos/LinePromotionAmount.d.ts +6 -0
- package/bin/retailPromotions/dtos/LinePromotionAmount.js +36 -0
- package/bin/retailPromotions/dtos/LinePromotionDiscount.d.ts +4 -0
- package/bin/retailPromotions/dtos/SalePromotion.d.ts +2 -0
- package/bin/retailPromotions/dtos/SalePromotionRef.d.ts +5 -0
- package/bin/retailPromotions/dtos/SalePromotionRef.js +30 -0
- package/bin/retailPromotions/dtos/requests/CreateSalePromotionRequest.d.ts +2 -0
- package/bin/retailPromotions/dtos/requests/CreateSalePromotionRequest.js +6 -0
- package/bin/retailPromotions/dtos/requests/HoldPromotionInput.d.ts +8 -0
- package/bin/retailPromotions/dtos/requests/HoldPromotionInput.js +46 -0
- package/bin/retailPromotions/dtos/requests/HoldSalePromotionRequest.d.ts +9 -3
- package/bin/retailPromotions/dtos/requests/HoldSalePromotionRequest.js +11 -0
- package/bin/retailPromotions/dtos/requests/UpdateSalePromotionRequest.d.ts +2 -0
- package/bin/retailPromotions/dtos/requests/UpdateSalePromotionRequest.js +6 -0
- package/bin/retailPromotions/dtos/responses/WizardSalePromotionResponses.d.ts +20 -0
- package/bin/retailPromotions/enums/RetailPromotionsErrorCodeEnum.d.ts +3 -1
- package/bin/retailPromotions/enums/RetailPromotionsErrorCodeEnum.js +2 -0
- package/bin/retailPromotions/index.d.ts +4 -0
- package/bin/retailPromotions/index.js +5 -0
- package/bin/retailPromotions/validators/IsHoldModeExclusiveConstraint.d.ts +6 -0
- package/bin/retailPromotions/validators/IsHoldModeExclusiveConstraint.js +24 -0
- package/bin/retailWizard/dtos/Sale.d.ts +3 -0
- package/bin/retailWizard/dtos/WizardLinePromotionFields.d.ts +4 -0
- package/bin/retailWizard/dtos/WizardSession.d.ts +3 -0
- package/bin/retailWizard/dtos/requests/ApplyLinePromotionRequest.d.ts +5 -0
- package/bin/retailWizard/dtos/requests/ApplyLinePromotionRequest.js +16 -0
- package/bin/retailWizard/dtos/requests/ApplySalePromotionRequest.d.ts +3 -0
- package/bin/retailWizard/dtos/requests/ApplySalePromotionRequest.js +9 -0
- package/bin/retailWizard/dtos/responses/PrivateWizardSessionResponse.d.ts +3 -0
- package/bin/retailWizard/events/RetailPromotionInboundMessage.d.ts +8 -0
- package/bin/retailWizard/events/RetailPromotionInboundMessage.js +22 -0
- package/bin/retailWizard/index.d.ts +2 -0
- package/bin/retailWizard/index.js +5 -0
- package/package.json +1 -1
- package/src/cognitoBackofficeConnector/dtos/AuthStartLoginRequest.ts +16 -0
- package/src/cognitoBackofficeConnector/dtos/AuthStartLoginResponse.ts +29 -0
- package/src/cognitoBackofficeConnector/index.ts +2 -0
- package/src/platformRbac/auth/DefineNextChallengeRequest.ts +7 -1
- package/src/platformRbac/enums/ChallengeNameEnum.ts +4 -0
- package/src/retailPromotions/constants/retailPromotionsErrorHttpStatus.ts +1 -0
- package/src/retailPromotions/dtos/LinePromotionAmount.ts +20 -0
- package/src/retailPromotions/dtos/LinePromotionDiscount.ts +5 -0
- package/src/retailPromotions/dtos/SalePromotion.ts +2 -0
- package/src/retailPromotions/dtos/SalePromotionRef.ts +15 -0
- package/src/retailPromotions/dtos/requests/CreateSalePromotionRequest.ts +6 -0
- package/src/retailPromotions/dtos/requests/HoldPromotionInput.ts +30 -0
- package/src/retailPromotions/dtos/requests/HoldSalePromotionRequest.ts +28 -4
- package/src/retailPromotions/dtos/requests/UpdateSalePromotionRequest.ts +6 -0
- package/src/retailPromotions/dtos/responses/WizardSalePromotionResponses.ts +21 -0
- package/src/retailPromotions/enums/RetailPromotionsErrorCodeEnum.ts +2 -0
- package/src/retailPromotions/index.ts +6 -0
- package/src/retailPromotions/validators/IsHoldModeExclusiveConstraint.ts +18 -0
- package/src/retailWizard/dtos/Sale.ts +3 -0
- package/src/retailWizard/dtos/WizardLinePromotionFields.ts +4 -0
- package/src/retailWizard/dtos/WizardSession.ts +3 -0
- package/src/retailWizard/dtos/requests/ApplyLinePromotionRequest.ts +18 -2
- package/src/retailWizard/dtos/requests/ApplySalePromotionRequest.ts +11 -2
- package/src/retailWizard/dtos/responses/PrivateWizardSessionResponse.ts +3 -0
- package/src/retailWizard/events/RetailPromotionInboundMessage.ts +22 -0
- package/src/retailWizard/index.ts +2 -0
|
@@ -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.LinePromotionAmount = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Descuento que una promo le aplica a una línea; la suma de la lista + el código da el total. */
|
|
16
|
+
class LinePromotionAmount {
|
|
17
|
+
}
|
|
18
|
+
exports.LinePromotionAmount = LinePromotionAmount;
|
|
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
|
+
], LinePromotionAmount.prototype, "promotionId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsInt)(),
|
|
28
|
+
(0, class_validator_1.Min)(1),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], LinePromotionAmount.prototype, "promotionVersion", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsInt)(),
|
|
34
|
+
(0, class_validator_1.Min)(0),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], LinePromotionAmount.prototype, "discountCents", void 0);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LinePromotionAmount } from './LinePromotionAmount';
|
|
1
2
|
/** Desglose por línea de la sesión: qué promo o código la tocó y cuánto bajó. */
|
|
2
3
|
export interface LinePromotionDiscount {
|
|
3
4
|
lineId: string;
|
|
@@ -7,4 +8,7 @@ export interface LinePromotionDiscount {
|
|
|
7
8
|
originalPriceCents: number;
|
|
8
9
|
discountCents: number;
|
|
9
10
|
finalPriceCents: number;
|
|
11
|
+
/** Descuento de cada promo en la línea; sin el campo, la de `promotionId` lleva todo menos el código. */
|
|
12
|
+
promotionDiscounts?: LinePromotionAmount[];
|
|
13
|
+
codeDiscountCents?: number;
|
|
10
14
|
}
|
|
@@ -21,6 +21,8 @@ export interface SalePromotion {
|
|
|
21
21
|
/** `null` = permanente. */
|
|
22
22
|
validUntil: string | null;
|
|
23
23
|
oncePerCustomer: boolean;
|
|
24
|
+
/** Si se puede sumar con otras promos en la misma línea. */
|
|
25
|
+
stackable: boolean;
|
|
24
26
|
status: SalePromotionStatusEnum;
|
|
25
27
|
/** Derivada; `null` cuando el estado no es `ACTIVE`. */
|
|
26
28
|
phase: SalePromotionPhaseEnum | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SalePromotionRef = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Promo de venta fijada en la sesión o en la venta, con su versión. */
|
|
16
|
+
class SalePromotionRef {
|
|
17
|
+
}
|
|
18
|
+
exports.SalePromotionRef = SalePromotionRef;
|
|
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
|
+
], SalePromotionRef.prototype, "promotionId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsInt)(),
|
|
28
|
+
(0, class_validator_1.Min)(1),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], SalePromotionRef.prototype, "promotionVersion", void 0);
|
|
@@ -81,3 +81,9 @@ __decorate([
|
|
|
81
81
|
(0, class_validator_1.IsBoolean)(),
|
|
82
82
|
__metadata("design:type", Boolean)
|
|
83
83
|
], CreateSalePromotionRequest.prototype, "oncePerCustomer", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_transformer_1.Expose)(),
|
|
86
|
+
(0, class_validator_1.IsOptional)(),
|
|
87
|
+
(0, class_validator_1.IsBoolean)(),
|
|
88
|
+
__metadata("design:type", Boolean)
|
|
89
|
+
], CreateSalePromotionRequest.prototype, "stackable", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Promo apartada en la lista nueva: a qué líneas aplica y qué regalos eligió el cliente. */
|
|
2
|
+
export declare class HoldPromotionInput {
|
|
3
|
+
promotionId: string;
|
|
4
|
+
promotionVersion: number;
|
|
5
|
+
/** Líneas que toca la promo; ausente = las que resuelva el lambda. */
|
|
6
|
+
lineIds?: string[];
|
|
7
|
+
giftSkus?: 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.HoldPromotionInput = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Promo apartada en la lista nueva: a qué líneas aplica y qué regalos eligió el cliente. */
|
|
16
|
+
class HoldPromotionInput {
|
|
17
|
+
}
|
|
18
|
+
exports.HoldPromotionInput = HoldPromotionInput;
|
|
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
|
+
], HoldPromotionInput.prototype, "promotionId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsInt)(),
|
|
28
|
+
(0, class_validator_1.Min)(1),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], HoldPromotionInput.prototype, "promotionVersion", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsArray)(),
|
|
35
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)({ each: true }),
|
|
37
|
+
__metadata("design:type", Array)
|
|
38
|
+
], HoldPromotionInput.prototype, "lineIds", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_transformer_1.Expose)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.IsArray)(),
|
|
43
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
44
|
+
(0, class_validator_1.IsNotEmpty)({ each: true }),
|
|
45
|
+
__metadata("design:type", Array)
|
|
46
|
+
], HoldPromotionInput.prototype, "giftSkus", void 0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HoldGiftPromotionInput } from './HoldGiftPromotionInput';
|
|
2
|
+
import { HoldPromotionInput } from './HoldPromotionInput';
|
|
2
3
|
/**
|
|
3
4
|
* Body de publicHoldSalePromotion (PUT, `sessionId` en el path): hasta una promo de regalo, una de venta
|
|
4
5
|
* y un código. `null` en cada una = sin ella; un PUT distinto reemplaza el apartado anterior.
|
|
@@ -6,16 +7,21 @@ import { HoldGiftPromotionInput } from './HoldGiftPromotionInput';
|
|
|
6
7
|
export declare class HoldSalePromotionRequest {
|
|
7
8
|
/**
|
|
8
9
|
* Promo de regalo del teléfono (su única palanca es el regalo).
|
|
9
|
-
*
|
|
10
|
+
* @deprecated Usa `promotions`; no se combina con él.
|
|
10
11
|
*/
|
|
11
12
|
gift?: HoldGiftPromotionInput | null;
|
|
12
13
|
/**
|
|
13
14
|
* Promo de venta; `null` = «Ninguna».
|
|
14
|
-
*
|
|
15
|
+
* @deprecated Usa `promotions`; no se combina con él.
|
|
15
16
|
*/
|
|
16
17
|
promotionId?: string | null;
|
|
17
18
|
promotionVersion?: number | null;
|
|
18
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Regalo incluido en la promo de venta, solo si esa promo además trae otras palancas.
|
|
21
|
+
* @deprecated Usa `giftSkus` en `promotions`.
|
|
22
|
+
*/
|
|
19
23
|
saleGiftSkus?: string[] | null;
|
|
20
24
|
discountCode?: string | null;
|
|
25
|
+
/** Promos apartadas, cada una con sus líneas y regalos; excluyente con la forma vieja. */
|
|
26
|
+
promotions?: HoldPromotionInput[] | null;
|
|
21
27
|
}
|
|
@@ -12,7 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.HoldSalePromotionRequest = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const IsHoldModeExclusiveConstraint_1 = require("../../validators/IsHoldModeExclusiveConstraint");
|
|
15
16
|
const HoldGiftPromotionInput_1 = require("./HoldGiftPromotionInput");
|
|
17
|
+
const HoldPromotionInput_1 = require("./HoldPromotionInput");
|
|
16
18
|
/**
|
|
17
19
|
* Body de publicHoldSalePromotion (PUT, `sessionId` en el path): hasta una promo de regalo, una de venta
|
|
18
20
|
* y un código. `null` en cada una = sin ella; un PUT distinto reemplaza el apartado anterior.
|
|
@@ -55,3 +57,12 @@ __decorate([
|
|
|
55
57
|
(0, class_validator_1.IsNotEmpty)(),
|
|
56
58
|
__metadata("design:type", String)
|
|
57
59
|
], HoldSalePromotionRequest.prototype, "discountCode", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_transformer_1.Expose)(),
|
|
62
|
+
(0, class_validator_1.IsOptional)(),
|
|
63
|
+
(0, class_validator_1.IsArray)(),
|
|
64
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
65
|
+
(0, class_transformer_1.Type)(() => HoldPromotionInput_1.HoldPromotionInput),
|
|
66
|
+
(0, class_validator_1.Validate)(IsHoldModeExclusiveConstraint_1.IsHoldModeExclusiveConstraint),
|
|
67
|
+
__metadata("design:type", Array)
|
|
68
|
+
], HoldSalePromotionRequest.prototype, "promotions", void 0);
|
|
@@ -83,3 +83,9 @@ __decorate([
|
|
|
83
83
|
(0, class_validator_1.IsBoolean)(),
|
|
84
84
|
__metadata("design:type", Boolean)
|
|
85
85
|
], UpdateSalePromotionRequest.prototype, "oncePerCustomer", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_transformer_1.Expose)(),
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
89
|
+
(0, class_validator_1.IsBoolean)(),
|
|
90
|
+
__metadata("design:type", Boolean)
|
|
91
|
+
], UpdateSalePromotionRequest.prototype, "stackable", void 0);
|
|
@@ -27,6 +27,10 @@ export interface StoreSalePromotionItem {
|
|
|
27
27
|
scope: SalePromotionScope;
|
|
28
28
|
/** SUREKEEP_ONLY = solo con crédito SureKeep; ANY_FINANCIER = también contado o derivada. */
|
|
29
29
|
appliesTo: PromotionAppliesToEnum;
|
|
30
|
+
/** Si se puede sumar con otras promos en la misma línea. */
|
|
31
|
+
stackable: boolean;
|
|
32
|
+
/** Ocupa el lugar de la línea ancla (teléfono o kit), aunque no la toque directo. */
|
|
33
|
+
anchorBound: boolean;
|
|
30
34
|
conditions?: SalePromotionConditions;
|
|
31
35
|
/** Si viene, todavía no se puede decidir para este cliente (ej. CUSTOMER_NOT_IDENTIFIED). */
|
|
32
36
|
blockedBy?: RetailPromotionsErrorCodeEnum | null;
|
|
@@ -63,6 +67,10 @@ export interface EvaluatedSalePromotion {
|
|
|
63
67
|
afterSale: AfterSaleBenefit[];
|
|
64
68
|
/** SUREKEEP_ONLY = solo con crédito SureKeep; ANY_FINANCIER = también contado o derivada. */
|
|
65
69
|
appliesTo: PromotionAppliesToEnum;
|
|
70
|
+
/** Si se puede sumar con otras promos en la misma línea. */
|
|
71
|
+
stackable: boolean;
|
|
72
|
+
/** Ocupa el lugar de la línea ancla (teléfono o kit), aunque no la toque directo. */
|
|
73
|
+
anchorBound: boolean;
|
|
66
74
|
conditions?: SalePromotionConditions;
|
|
67
75
|
/** Si viene, la promo se muestra pero no se puede elegir; dice por qué (ej. CUSTOMER_NOT_IDENTIFIED). */
|
|
68
76
|
blockedBy?: RetailPromotionsErrorCodeEnum | null;
|
|
@@ -85,6 +93,15 @@ export interface HeldGiftPromotion {
|
|
|
85
93
|
promotionVersion: number;
|
|
86
94
|
skus: string[];
|
|
87
95
|
}
|
|
96
|
+
/** Promo apartada en la lista nueva, con las líneas que toca y los regalos elegidos. */
|
|
97
|
+
export interface HeldPromotion {
|
|
98
|
+
promotionId: string;
|
|
99
|
+
promotionVersion: number;
|
|
100
|
+
kind: SalePromotionKindEnum;
|
|
101
|
+
stackable: boolean;
|
|
102
|
+
lineIds: string[];
|
|
103
|
+
giftSkus: string[];
|
|
104
|
+
}
|
|
88
105
|
/** Lo que quedó apartado y escrito en la sesión: la promo de regalo, la de venta y el código. */
|
|
89
106
|
export interface HoldSalePromotionResponse {
|
|
90
107
|
sessionId: string;
|
|
@@ -96,6 +113,8 @@ export interface HoldSalePromotionResponse {
|
|
|
96
113
|
saleGiftSkus: string[];
|
|
97
114
|
lines: LinePromotionDiscount[];
|
|
98
115
|
totalDiscountCents: number;
|
|
116
|
+
/** Todas las promos apartadas; los campos de arriba se conservan por compatibilidad. */
|
|
117
|
+
promotions: HeldPromotion[];
|
|
99
118
|
}
|
|
100
119
|
/** `released: false` = no había apartado; soltar es idempotente. */
|
|
101
120
|
export interface ReleaseSalePromotionResponse {
|
|
@@ -127,6 +146,7 @@ export interface SaleAppliedPromotion {
|
|
|
127
146
|
version: number;
|
|
128
147
|
name: string;
|
|
129
148
|
kind: SalePromotionKindEnum;
|
|
149
|
+
stackable?: boolean;
|
|
130
150
|
}
|
|
131
151
|
/** Cupón y «lo que se lleva» de una venta cerrada (publicGetSaleCoupon). */
|
|
132
152
|
export interface GetSaleCouponResponse {
|
|
@@ -44,5 +44,7 @@ export declare enum RetailPromotionsErrorCodeEnum {
|
|
|
44
44
|
/** El SKU no existe en el catálogo. */
|
|
45
45
|
CATALOG_SKU_NOT_FOUND = "CATALOG_SKU_NOT_FOUND",
|
|
46
46
|
/** Con el reparto apagado no se aplican palancas de precio ni código; los regalos sí. */
|
|
47
|
-
SPLIT_FINANCING_DISABLED = "SPLIT_FINANCING_DISABLED"
|
|
47
|
+
SPLIT_FINANCING_DISABLED = "SPLIT_FINANCING_DISABLED",
|
|
48
|
+
/** La promo no acumulable choca con otra en la misma línea. */
|
|
49
|
+
PROMOTION_NOT_STACKABLE = "PROMOTION_NOT_STACKABLE"
|
|
48
50
|
}
|
|
@@ -49,4 +49,6 @@ var RetailPromotionsErrorCodeEnum;
|
|
|
49
49
|
RetailPromotionsErrorCodeEnum["CATALOG_SKU_NOT_FOUND"] = "CATALOG_SKU_NOT_FOUND";
|
|
50
50
|
/** Con el reparto apagado no se aplican palancas de precio ni código; los regalos sí. */
|
|
51
51
|
RetailPromotionsErrorCodeEnum["SPLIT_FINANCING_DISABLED"] = "SPLIT_FINANCING_DISABLED";
|
|
52
|
+
/** La promo no acumulable choca con otra en la misma línea. */
|
|
53
|
+
RetailPromotionsErrorCodeEnum["PROMOTION_NOT_STACKABLE"] = "PROMOTION_NOT_STACKABLE";
|
|
52
54
|
})(RetailPromotionsErrorCodeEnum || (exports.RetailPromotionsErrorCodeEnum = RetailPromotionsErrorCodeEnum = {}));
|
|
@@ -29,6 +29,9 @@ export * from './dtos/SalePromotion';
|
|
|
29
29
|
export * from './dtos/SalePromotionLogEntry';
|
|
30
30
|
export * from './dtos/DiscountCode';
|
|
31
31
|
export * from './dtos/LinePromotionDiscount';
|
|
32
|
+
export * from './dtos/LinePromotionAmount';
|
|
33
|
+
export * from './dtos/SalePromotionRef';
|
|
34
|
+
export * from './validators/IsHoldModeExclusiveConstraint';
|
|
32
35
|
export * from './dtos/requests/DiscountValueInput';
|
|
33
36
|
export * from './dtos/requests/SalePromotionLeversInput';
|
|
34
37
|
export * from './dtos/requests/SalePromotionScopeInput';
|
|
@@ -43,6 +46,7 @@ export * from './dtos/requests/ChangeDiscountCodeStatusRequest';
|
|
|
43
46
|
export * from './dtos/requests/ListStoreSalePromotionsQuery';
|
|
44
47
|
export * from './dtos/requests/EvaluateSalePromotionsRequest';
|
|
45
48
|
export * from './dtos/requests/HoldGiftPromotionInput';
|
|
49
|
+
export * from './dtos/requests/HoldPromotionInput';
|
|
46
50
|
export * from './dtos/requests/HoldSalePromotionRequest';
|
|
47
51
|
export * from './dtos/requests/GetSaleCouponQuery';
|
|
48
52
|
export * from './dtos/requests/SkuSalePromotionsQuery';
|
|
@@ -48,6 +48,10 @@ __exportStar(require("./dtos/SalePromotion"), exports);
|
|
|
48
48
|
__exportStar(require("./dtos/SalePromotionLogEntry"), exports);
|
|
49
49
|
__exportStar(require("./dtos/DiscountCode"), exports);
|
|
50
50
|
__exportStar(require("./dtos/LinePromotionDiscount"), exports);
|
|
51
|
+
__exportStar(require("./dtos/LinePromotionAmount"), exports);
|
|
52
|
+
__exportStar(require("./dtos/SalePromotionRef"), exports);
|
|
53
|
+
// Validadores
|
|
54
|
+
__exportStar(require("./validators/IsHoldModeExclusiveConstraint"), exports);
|
|
51
55
|
// Request DTOs
|
|
52
56
|
__exportStar(require("./dtos/requests/DiscountValueInput"), exports);
|
|
53
57
|
__exportStar(require("./dtos/requests/SalePromotionLeversInput"), exports);
|
|
@@ -63,6 +67,7 @@ __exportStar(require("./dtos/requests/ChangeDiscountCodeStatusRequest"), exports
|
|
|
63
67
|
__exportStar(require("./dtos/requests/ListStoreSalePromotionsQuery"), exports);
|
|
64
68
|
__exportStar(require("./dtos/requests/EvaluateSalePromotionsRequest"), exports);
|
|
65
69
|
__exportStar(require("./dtos/requests/HoldGiftPromotionInput"), exports);
|
|
70
|
+
__exportStar(require("./dtos/requests/HoldPromotionInput"), exports);
|
|
66
71
|
__exportStar(require("./dtos/requests/HoldSalePromotionRequest"), exports);
|
|
67
72
|
__exportStar(require("./dtos/requests/GetSaleCouponQuery"), exports);
|
|
68
73
|
__exportStar(require("./dtos/requests/SkuSalePromotionsQuery"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ValidationArguments, type ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
+
/** Rechaza mandar `promotions` junto con `gift`, `promotionId` o `saleGiftSkus` (forma vieja). */
|
|
3
|
+
export declare class IsHoldModeExclusiveConstraint implements ValidatorConstraintInterface {
|
|
4
|
+
validate(_value: unknown, args: ValidationArguments): boolean;
|
|
5
|
+
defaultMessage(): string;
|
|
6
|
+
}
|
|
@@ -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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.IsHoldModeExclusiveConstraint = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
/** Rechaza mandar `promotions` junto con `gift`, `promotionId` o `saleGiftSkus` (forma vieja). */
|
|
12
|
+
let IsHoldModeExclusiveConstraint = class IsHoldModeExclusiveConstraint {
|
|
13
|
+
validate(_value, args) {
|
|
14
|
+
const o = args.object;
|
|
15
|
+
return o.gift == null && o.promotionId == null && o.saleGiftSkus == null;
|
|
16
|
+
}
|
|
17
|
+
defaultMessage() {
|
|
18
|
+
return 'promotions no se combina con gift, promotionId ni saleGiftSkus';
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.IsHoldModeExclusiveConstraint = IsHoldModeExclusiveConstraint;
|
|
22
|
+
exports.IsHoldModeExclusiveConstraint = IsHoldModeExclusiveConstraint = __decorate([
|
|
23
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'isHoldModeExclusive', async: false })
|
|
24
|
+
], IsHoldModeExclusiveConstraint);
|
|
@@ -5,6 +5,7 @@ import type { ExternalProviderEnum } from '../enums/ExternalProviderEnum';
|
|
|
5
5
|
import type { CentralSyncStatusEnum } from '../enums/CentralSyncStatusEnum';
|
|
6
6
|
import type { SalePaymentDetail } from './SalePaymentDetail';
|
|
7
7
|
import type { SaleLine } from './SaleLine';
|
|
8
|
+
import type { SalePromotionRef } from '../../retailPromotions/dtos/SalePromotionRef';
|
|
8
9
|
/**
|
|
9
10
|
* Venta (modelo-datos §3). pk `SALE#<saleId>` · sk `META` · 4 GSIs (`retailerId-soldAt-index`,
|
|
10
11
|
* `storeId-soldAt-index`, `seller-soldAt-index`, `customerId-soldAt-index`). Unicidad de folio vía
|
|
@@ -31,6 +32,8 @@ export interface Sale {
|
|
|
31
32
|
/** Promo de venta congelada al cerrar; `null` = ninguna. */
|
|
32
33
|
salePromotionId?: string | null;
|
|
33
34
|
salePromotionVersion?: number | null;
|
|
35
|
+
/** Todas las promos de venta congeladas al cerrar. */
|
|
36
|
+
salePromotions?: SalePromotionRef[] | null;
|
|
34
37
|
/** IMEI consumido del silo también en contado (local-first); null en EXTERNAL_REFERRAL (D15). */
|
|
35
38
|
imei: string | null;
|
|
36
39
|
/** Lo cobrado en caja al cerrar: enganche + lo no financiado; 0 en EXTERNAL_REFERRAL. Contrato de `SaleCompletedV1`. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LinePromotionAmount } from '../../retailPromotions/dtos/LinePromotionAmount';
|
|
1
2
|
import type { WizardLineRoleEnum } from '../enums/WizardLineRoleEnum';
|
|
2
3
|
/** Campos de Promociones en la línea de sesión y de venta; solo los escribe su endpoint M2M. */
|
|
3
4
|
export interface WizardLinePromotionFields {
|
|
@@ -12,4 +13,7 @@ export interface WizardLinePromotionFields {
|
|
|
12
13
|
discountCents?: number;
|
|
13
14
|
/** Precio antes del descuento; en un regalo, el valor de lista con la línea a $0. */
|
|
14
15
|
originalPriceCents?: number;
|
|
16
|
+
/** Descuento de cada promo en la línea; sin el campo, la de `promotionId` lleva todo menos el código. */
|
|
17
|
+
promotionDiscounts?: LinePromotionAmount[];
|
|
18
|
+
codeDiscountCents?: number;
|
|
15
19
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SalePromotionRef } from '../../retailPromotions/dtos/SalePromotionRef';
|
|
1
2
|
import type { WizardStateEnum } from '../enums/WizardStateEnum';
|
|
2
3
|
import type { WizardStepEnum } from '../enums/WizardStepEnum';
|
|
3
4
|
import type { FiadoPhoneStatusEnum } from '../enums/FiadoPhoneStatusEnum';
|
|
@@ -122,6 +123,8 @@ export interface WizardSession {
|
|
|
122
123
|
/** Promo de venta que fijó Promociones; `null` = ninguna. */
|
|
123
124
|
salePromotionId?: string | null;
|
|
124
125
|
salePromotionVersion?: number | null;
|
|
126
|
+
/** Todas las promos de venta fijadas; `salePromotionId` queda como la principal. */
|
|
127
|
+
salePromotions?: SalePromotionRef[] | null;
|
|
125
128
|
/** Enganche cobrado que queda por reembolsar tras cancelar. */
|
|
126
129
|
refundPendingCents?: number;
|
|
127
130
|
paymentMethod: PaymentMethodEnum | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LinePromotionAmount } from '../../../retailPromotions/dtos/LinePromotionAmount';
|
|
1
2
|
/**
|
|
2
3
|
* PUT …/lines/{lineId}/promotion (privateApplyLinePromotion): reemplaza la promo de la línea por valor.
|
|
3
4
|
* Un campo ausente queda borrado; no toca role ni linkedLineId. `tenantId` va en el query.
|
|
@@ -11,4 +12,8 @@ export declare class ApplyLinePromotionRequest {
|
|
|
11
12
|
/** Descuento total de la línea; 0 mientras el código espera revalidarse. */
|
|
12
13
|
discountCents?: number;
|
|
13
14
|
originalPriceCents?: number;
|
|
15
|
+
/** Descuento de cada promo en la línea; `promotionId` queda como la principal. */
|
|
16
|
+
promotionDiscounts?: LinePromotionAmount[];
|
|
17
|
+
/** Parte de `discountCents` que viene del código. */
|
|
18
|
+
codeDiscountCents?: number;
|
|
14
19
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ApplyLinePromotionRequest = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const LinePromotionAmount_1 = require("../../../retailPromotions/dtos/LinePromotionAmount");
|
|
15
16
|
const hasPromotion = (o) => o.promotionId !== undefined || o.promotionVersion !== undefined;
|
|
16
17
|
/**
|
|
17
18
|
* PUT …/lines/{lineId}/promotion (privateApplyLinePromotion): reemplaza la promo de la línea por valor.
|
|
@@ -55,3 +56,18 @@ __decorate([
|
|
|
55
56
|
(0, class_validator_1.Min)(0),
|
|
56
57
|
__metadata("design:type", Number)
|
|
57
58
|
], ApplyLinePromotionRequest.prototype, "originalPriceCents", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_transformer_1.Expose)(),
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.IsArray)(),
|
|
63
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
64
|
+
(0, class_transformer_1.Type)(() => LinePromotionAmount_1.LinePromotionAmount),
|
|
65
|
+
__metadata("design:type", Array)
|
|
66
|
+
], ApplyLinePromotionRequest.prototype, "promotionDiscounts", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, class_transformer_1.Expose)(),
|
|
69
|
+
(0, class_validator_1.IsOptional)(),
|
|
70
|
+
(0, class_validator_1.IsInt)(),
|
|
71
|
+
(0, class_validator_1.Min)(0),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], ApplyLinePromotionRequest.prototype, "codeDiscountCents", void 0);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SalePromotionRef } from '../../../retailPromotions/dtos/SalePromotionRef';
|
|
1
2
|
/**
|
|
2
3
|
* PUT /private/wizard/sessions/{id}/sale-promotion (privateApplySalePromotion, M2M de Promociones).
|
|
3
4
|
* Ambos en `null` = «Ninguna»; la versión va solo con la promo. `tenantId` va en el query.
|
|
@@ -6,4 +7,6 @@
|
|
|
6
7
|
export declare class ApplySalePromotionRequest {
|
|
7
8
|
salePromotionId: string | null;
|
|
8
9
|
salePromotionVersion: number | null;
|
|
10
|
+
/** Todas las promos de venta fijadas; `salePromotionId` queda como la principal. */
|
|
11
|
+
salePromotions?: SalePromotionRef[] | null;
|
|
9
12
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ApplySalePromotionRequest = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SalePromotionRef_1 = require("../../../retailPromotions/dtos/SalePromotionRef");
|
|
15
16
|
/**
|
|
16
17
|
* PUT /private/wizard/sessions/{id}/sale-promotion (privateApplySalePromotion, M2M de Promociones).
|
|
17
18
|
* Ambos en `null` = «Ninguna»; la versión va solo con la promo. `tenantId` va en el query.
|
|
@@ -34,3 +35,11 @@ __decorate([
|
|
|
34
35
|
(0, class_validator_1.Min)(1),
|
|
35
36
|
__metadata("design:type", Number)
|
|
36
37
|
], ApplySalePromotionRequest.prototype, "salePromotionVersion", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_transformer_1.Expose)(),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
(0, class_validator_1.IsArray)(),
|
|
42
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
43
|
+
(0, class_transformer_1.Type)(() => SalePromotionRef_1.SalePromotionRef),
|
|
44
|
+
__metadata("design:type", Array)
|
|
45
|
+
], ApplySalePromotionRequest.prototype, "salePromotions", void 0);
|
|
@@ -3,6 +3,7 @@ import type { WizardStateEnum } from '../../enums/WizardStateEnum';
|
|
|
3
3
|
import type { WizardStepEnum } from '../../enums/WizardStepEnum';
|
|
4
4
|
import type { WizardPayment } from '../WizardPayment';
|
|
5
5
|
import type { WizardReservedLine } from '../WizardReservedLine';
|
|
6
|
+
import type { SalePromotionRef } from '../../../retailPromotions/dtos/SalePromotionRef';
|
|
6
7
|
/** GET /private/wizard/sessions/{id} (privateGetWizardSession): lo que Promociones lee de la sesión. */
|
|
7
8
|
export interface PrivateWizardSessionResponse {
|
|
8
9
|
sessionId: string;
|
|
@@ -18,6 +19,8 @@ export interface PrivateWizardSessionResponse {
|
|
|
18
19
|
anchorLineId: string | null;
|
|
19
20
|
salePromotionId: string | null;
|
|
20
21
|
salePromotionVersion: number | null;
|
|
22
|
+
/** Todas las promos de venta fijadas; `salePromotionId` queda como la principal. */
|
|
23
|
+
salePromotions?: SalePromotionRef[] | null;
|
|
21
24
|
/** Líneas vivas con los campos de Promociones y financedCents. */
|
|
22
25
|
lines: WizardReservedLine[];
|
|
23
26
|
fiadoDirectoryId?: string | null;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { LinePromotionAmount } from '../../retailPromotions/dtos/LinePromotionAmount';
|
|
2
|
+
import { SalePromotionRef } from '../../retailPromotions/dtos/SalePromotionRef';
|
|
1
3
|
import { RetailPromotionInboundMessageTypeEnum } from '../enums/RetailPromotionInboundMessageTypeEnum';
|
|
2
4
|
import { WizardLineRoleEnum } from '../enums/WizardLineRoleEnum';
|
|
3
5
|
/** Línea de la venta en el mensaje de Promociones. */
|
|
@@ -12,6 +14,10 @@ export declare class RetailPromotionInboundLine {
|
|
|
12
14
|
/** Solo en la línea ancla. */
|
|
13
15
|
discountCode?: string;
|
|
14
16
|
discountCents?: number;
|
|
17
|
+
/** Descuento de cada promo en la línea; `promotionId` queda como la principal. */
|
|
18
|
+
promotionDiscounts?: LinePromotionAmount[];
|
|
19
|
+
/** Parte de `discountCents` que viene del código. */
|
|
20
|
+
codeDiscountCents?: number;
|
|
15
21
|
/** Si la línea no lo trae, basePriceCents × qty. */
|
|
16
22
|
originalPriceCents: number;
|
|
17
23
|
/** Identificadores de todos los componentes de la línea, aplanados. */
|
|
@@ -36,5 +42,7 @@ export declare class RetailPromotionInboundMessage {
|
|
|
36
42
|
fiadoDirectoryId?: string;
|
|
37
43
|
salePromotionId?: string | null;
|
|
38
44
|
salePromotionVersion?: number | null;
|
|
45
|
+
/** Todas las promos de venta de la venta; `salePromotionId` queda como la principal. */
|
|
46
|
+
salePromotions?: SalePromotionRef[] | null;
|
|
39
47
|
lines: RetailPromotionInboundLine[];
|
|
40
48
|
}
|
|
@@ -12,6 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.RetailPromotionInboundMessage = exports.RetailPromotionInboundLine = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const LinePromotionAmount_1 = require("../../retailPromotions/dtos/LinePromotionAmount");
|
|
16
|
+
const SalePromotionRef_1 = require("../../retailPromotions/dtos/SalePromotionRef");
|
|
15
17
|
const RetailPromotionInboundMessageTypeEnum_1 = require("../enums/RetailPromotionInboundMessageTypeEnum");
|
|
16
18
|
const WizardLineRoleEnum_1 = require("../enums/WizardLineRoleEnum");
|
|
17
19
|
/** Línea de la venta en el mensaje de Promociones. */
|
|
@@ -68,6 +70,19 @@ __decorate([
|
|
|
68
70
|
(0, class_validator_1.Min)(0),
|
|
69
71
|
__metadata("design:type", Number)
|
|
70
72
|
], RetailPromotionInboundLine.prototype, "discountCents", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
(0, class_validator_1.IsArray)(),
|
|
76
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
77
|
+
(0, class_transformer_1.Type)(() => LinePromotionAmount_1.LinePromotionAmount),
|
|
78
|
+
__metadata("design:type", Array)
|
|
79
|
+
], RetailPromotionInboundLine.prototype, "promotionDiscounts", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_validator_1.IsOptional)(),
|
|
82
|
+
(0, class_validator_1.IsInt)(),
|
|
83
|
+
(0, class_validator_1.Min)(0),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], RetailPromotionInboundLine.prototype, "codeDiscountCents", void 0);
|
|
71
86
|
__decorate([
|
|
72
87
|
(0, class_validator_1.IsInt)(),
|
|
73
88
|
(0, class_validator_1.Min)(0),
|
|
@@ -153,6 +168,13 @@ __decorate([
|
|
|
153
168
|
(0, class_validator_1.Min)(1),
|
|
154
169
|
__metadata("design:type", Number)
|
|
155
170
|
], RetailPromotionInboundMessage.prototype, "salePromotionVersion", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, class_validator_1.IsOptional)(),
|
|
173
|
+
(0, class_validator_1.IsArray)(),
|
|
174
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
175
|
+
(0, class_transformer_1.Type)(() => SalePromotionRef_1.SalePromotionRef),
|
|
176
|
+
__metadata("design:type", Array)
|
|
177
|
+
], RetailPromotionInboundMessage.prototype, "salePromotions", void 0);
|
|
156
178
|
__decorate([
|
|
157
179
|
(0, class_validator_1.IsArray)(),
|
|
158
180
|
(0, class_validator_1.ArrayMinSize)(1),
|
|
@@ -41,6 +41,8 @@ export * from './dtos/WizardBlocked';
|
|
|
41
41
|
export * from './dtos/WizardLineProduct';
|
|
42
42
|
export * from './dtos/WizardLineIdentifiers';
|
|
43
43
|
export * from './dtos/WizardLinePromotionFields';
|
|
44
|
+
export { LinePromotionAmount } from '../retailPromotions/dtos/LinePromotionAmount';
|
|
45
|
+
export { SalePromotionRef } from '../retailPromotions/dtos/SalePromotionRef';
|
|
44
46
|
export * from './dtos/WizardFinancingPreview';
|
|
45
47
|
export * from './dtos/WizardReservedLine';
|
|
46
48
|
export * from './dtos/WizardGiftLine';
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SalePromotionRef = exports.LinePromotionAmount = void 0;
|
|
17
18
|
// Catálogos de valores compartidos entre endpoints
|
|
18
19
|
__exportStar(require("./catalog/monthlyIncome"), exports);
|
|
19
20
|
// Enums
|
|
@@ -60,6 +61,10 @@ __exportStar(require("./dtos/WizardBlocked"), exports);
|
|
|
60
61
|
__exportStar(require("./dtos/WizardLineProduct"), exports);
|
|
61
62
|
__exportStar(require("./dtos/WizardLineIdentifiers"), exports);
|
|
62
63
|
__exportStar(require("./dtos/WizardLinePromotionFields"), exports);
|
|
64
|
+
var LinePromotionAmount_1 = require("../retailPromotions/dtos/LinePromotionAmount");
|
|
65
|
+
Object.defineProperty(exports, "LinePromotionAmount", { enumerable: true, get: function () { return LinePromotionAmount_1.LinePromotionAmount; } });
|
|
66
|
+
var SalePromotionRef_1 = require("../retailPromotions/dtos/SalePromotionRef");
|
|
67
|
+
Object.defineProperty(exports, "SalePromotionRef", { enumerable: true, get: function () { return SalePromotionRef_1.SalePromotionRef; } });
|
|
63
68
|
__exportStar(require("./dtos/WizardFinancingPreview"), exports);
|
|
64
69
|
__exportStar(require("./dtos/WizardReservedLine"), exports);
|
|
65
70
|
__exportStar(require("./dtos/WizardGiftLine"), exports);
|