@fiado/type-kit 3.564.0 → 3.565.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/retailCustomer/customerReferralContract.test.ts +228 -0
- package/_test_/unit/retailPromotions/constants.test.ts +1 -1
- package/_test_/unit/retailPromotions/referralPromotion.test.ts +177 -0
- package/_test_/unit/retailPromotions/referralRewardsByPhones.test.ts +73 -0
- package/_test_/unit/retailPromotions/salePromotionPaymentCheck.test.ts +26 -0
- package/_test_/unit/retailWizard/backofficeCustomerReferrals.test.ts +78 -0
- package/_test_/unit/retailWizard/promotionInboundMessages.test.ts +151 -0
- package/_test_/unit/retailWizard/referralsCapture.test.ts +66 -0
- package/_test_/unit/retailWizard/ventaSagaMessages.test.ts +7 -2
- package/bin/retailCustomer/dtos/CustomerReferral.d.ts +25 -0
- package/bin/retailCustomer/dtos/CustomerReferral.js +99 -0
- package/bin/retailCustomer/dtos/requests/CreateCustomerReferralsRequest.d.ts +19 -0
- package/bin/retailCustomer/dtos/requests/CreateCustomerReferralsRequest.js +101 -0
- package/bin/retailCustomer/dtos/requests/GetCustomersByPhonesRequest.d.ts +4 -0
- package/bin/retailCustomer/dtos/requests/GetCustomersByPhonesRequest.js +28 -0
- package/bin/retailCustomer/dtos/requests/GetReferralsByPhoneQuery.d.ts +6 -0
- package/bin/retailCustomer/dtos/requests/GetReferralsByPhoneQuery.js +39 -0
- package/bin/retailCustomer/dtos/requests/UpdateCustomerReferralRequest.d.ts +8 -0
- package/bin/retailCustomer/dtos/requests/UpdateCustomerReferralRequest.js +53 -0
- package/bin/retailCustomer/dtos/requests/UpsertPromotionBonusRequest.d.ts +4 -0
- package/bin/retailCustomer/dtos/requests/UpsertPromotionBonusRequest.js +15 -0
- package/bin/retailCustomer/dtos/responses/CustomerReferralResponses.d.ts +39 -0
- package/bin/retailCustomer/dtos/responses/CustomerReferralResponses.js +2 -0
- package/bin/retailCustomer/enums/ReferralRoleEnum.d.ts +5 -0
- package/bin/retailCustomer/enums/ReferralRoleEnum.js +9 -0
- package/bin/retailCustomer/enums/ReferralSourceEnum.d.ts +6 -0
- package/bin/retailCustomer/enums/ReferralSourceEnum.js +10 -0
- package/bin/retailCustomer/enums/ReferralStatusEnum.d.ts +7 -0
- package/bin/retailCustomer/enums/ReferralStatusEnum.js +11 -0
- package/bin/retailCustomer/index.d.ts +9 -0
- package/bin/retailCustomer/index.js +9 -0
- package/bin/retailPromotions/constants/retailPromotionsErrorHttpStatus.js +2 -0
- package/bin/retailPromotions/dtos/ReferralPromotion.d.ts +33 -0
- package/bin/retailPromotions/dtos/ReferralPromotion.js +2 -0
- package/bin/retailPromotions/dtos/SalePromotion.d.ts +3 -0
- package/bin/retailPromotions/dtos/requests/CheckSalePromotionPaymentRequest.d.ts +5 -0
- package/bin/retailPromotions/dtos/requests/CheckSalePromotionPaymentRequest.js +24 -0
- package/bin/retailPromotions/dtos/requests/CreateSalePromotionRequest.d.ts +3 -0
- package/bin/retailPromotions/dtos/requests/CreateSalePromotionRequest.js +8 -0
- package/bin/retailPromotions/dtos/requests/GetReferralRewardsByPhonesRequest.d.ts +5 -0
- package/bin/retailPromotions/dtos/requests/GetReferralRewardsByPhonesRequest.js +34 -0
- package/bin/retailPromotions/dtos/requests/ListSalePromotionsQuery.d.ts +6 -1
- package/bin/retailPromotions/dtos/requests/ListSalePromotionsQuery.js +15 -1
- package/bin/retailPromotions/dtos/requests/ReferralPromotionInput.d.ts +24 -0
- package/bin/retailPromotions/dtos/requests/ReferralPromotionInput.js +119 -0
- package/bin/retailPromotions/dtos/requests/UpdateSalePromotionRequest.d.ts +3 -0
- package/bin/retailPromotions/dtos/requests/UpdateSalePromotionRequest.js +8 -0
- package/bin/retailPromotions/dtos/responses/ReferralRewardsByPhonesResponses.d.ts +25 -0
- package/bin/retailPromotions/dtos/responses/ReferralRewardsByPhonesResponses.js +2 -0
- package/bin/retailPromotions/dtos/responses/SalePromotionPaymentCheckResponses.d.ts +16 -0
- package/bin/retailPromotions/dtos/responses/SalePromotionPaymentCheckResponses.js +2 -0
- package/bin/retailPromotions/enums/ReferralPromotionChannelEnum.d.ts +5 -0
- package/bin/retailPromotions/enums/ReferralPromotionChannelEnum.js +9 -0
- package/bin/retailPromotions/enums/ReferralRewardStatusEnum.d.ts +9 -0
- package/bin/retailPromotions/enums/ReferralRewardStatusEnum.js +13 -0
- package/bin/retailPromotions/enums/ReferralRewardTypeEnum.d.ts +10 -0
- package/bin/retailPromotions/enums/ReferralRewardTypeEnum.js +14 -0
- package/bin/retailPromotions/enums/ReferralTriggerEnum.d.ts +13 -0
- package/bin/retailPromotions/enums/ReferralTriggerEnum.js +17 -0
- package/bin/retailPromotions/enums/RetailPromotionsErrorCodeEnum.d.ts +5 -1
- package/bin/retailPromotions/enums/RetailPromotionsErrorCodeEnum.js +4 -0
- package/bin/retailPromotions/enums/SalePromotionKindEnum.d.ts +3 -2
- package/bin/retailPromotions/enums/SalePromotionKindEnum.js +2 -1
- package/bin/retailPromotions/index.d.ts +10 -0
- package/bin/retailPromotions/index.js +10 -0
- package/bin/retailWizard/dtos/responses/BackofficeCustomerReferralsResponse.d.ts +58 -0
- package/bin/retailWizard/dtos/responses/BackofficeCustomerReferralsResponse.js +2 -0
- package/bin/retailWizard/enums/RetailPromotionInboundMessageTypeEnum.d.ts +4 -2
- package/bin/retailWizard/enums/RetailPromotionInboundMessageTypeEnum.js +3 -1
- package/bin/retailWizard/enums/WizardStepEnum.d.ts +3 -1
- package/bin/retailWizard/enums/WizardStepEnum.js +2 -0
- package/bin/retailWizard/events/RetailCommissionInboundMessage.d.ts +7 -0
- package/bin/retailWizard/events/RetailCommissionInboundMessage.js +22 -1
- package/bin/retailWizard/events/RetailPromotionAccountOpenedMessage.d.ts +15 -0
- package/bin/retailWizard/events/RetailPromotionAccountOpenedMessage.js +56 -0
- package/bin/retailWizard/events/RetailPromotionInboundMessage.d.ts +15 -0
- package/bin/retailWizard/events/RetailPromotionInboundMessage.js +41 -1
- package/bin/retailWizard/events/RetailPromotionInstallmentPaidMessage.d.ts +20 -0
- package/bin/retailWizard/events/RetailPromotionInstallmentPaidMessage.js +75 -0
- package/bin/retailWizard/events/RetailPromotionQueueMessage.d.ts +5 -0
- package/bin/retailWizard/events/RetailPromotionQueueMessage.js +2 -0
- package/bin/retailWizard/index.d.ts +4 -0
- package/bin/retailWizard/index.js +4 -0
- package/package.json +1 -1
- package/src/retailCustomer/dtos/CustomerReferral.ts +77 -0
- package/src/retailCustomer/dtos/requests/CreateCustomerReferralsRequest.ts +91 -0
- package/src/retailCustomer/dtos/requests/GetCustomersByPhonesRequest.ts +15 -0
- package/src/retailCustomer/dtos/requests/GetReferralsByPhoneQuery.ts +23 -0
- package/src/retailCustomer/dtos/requests/UpdateCustomerReferralRequest.ts +38 -0
- package/src/retailCustomer/dtos/requests/UpsertPromotionBonusRequest.ts +15 -1
- package/src/retailCustomer/dtos/responses/CustomerReferralResponses.ts +46 -0
- package/src/retailCustomer/enums/ReferralRoleEnum.ts +5 -0
- package/src/retailCustomer/enums/ReferralSourceEnum.ts +6 -0
- package/src/retailCustomer/enums/ReferralStatusEnum.ts +7 -0
- package/src/retailCustomer/index.ts +9 -0
- package/src/retailPromotions/constants/retailPromotionsErrorHttpStatus.ts +2 -0
- package/src/retailPromotions/dtos/ReferralPromotion.ts +35 -0
- package/src/retailPromotions/dtos/SalePromotion.ts +3 -0
- package/src/retailPromotions/dtos/requests/CheckSalePromotionPaymentRequest.ts +10 -0
- package/src/retailPromotions/dtos/requests/CreateSalePromotionRequest.ts +8 -0
- package/src/retailPromotions/dtos/requests/GetReferralRewardsByPhonesRequest.ts +20 -0
- package/src/retailPromotions/dtos/requests/ListSalePromotionsQuery.ts +14 -1
- package/src/retailPromotions/dtos/requests/ReferralPromotionInput.ts +93 -0
- package/src/retailPromotions/dtos/requests/UpdateSalePromotionRequest.ts +8 -0
- package/src/retailPromotions/dtos/responses/ReferralRewardsByPhonesResponses.ts +28 -0
- package/src/retailPromotions/dtos/responses/SalePromotionPaymentCheckResponses.ts +17 -0
- package/src/retailPromotions/enums/ReferralPromotionChannelEnum.ts +5 -0
- package/src/retailPromotions/enums/ReferralRewardStatusEnum.ts +9 -0
- package/src/retailPromotions/enums/ReferralRewardTypeEnum.ts +10 -0
- package/src/retailPromotions/enums/ReferralTriggerEnum.ts +13 -0
- package/src/retailPromotions/enums/RetailPromotionsErrorCodeEnum.ts +4 -0
- package/src/retailPromotions/enums/SalePromotionKindEnum.ts +2 -1
- package/src/retailPromotions/index.ts +10 -0
- package/src/retailWizard/dtos/responses/BackofficeCustomerReferralsResponse.ts +63 -0
- package/src/retailWizard/enums/RetailPromotionInboundMessageTypeEnum.ts +3 -1
- package/src/retailWizard/enums/WizardStepEnum.ts +2 -0
- package/src/retailWizard/events/RetailCommissionInboundMessage.ts +18 -0
- package/src/retailWizard/events/RetailPromotionAccountOpenedMessage.ts +38 -0
- package/src/retailWizard/events/RetailPromotionInboundMessage.ts +43 -1
- package/src/retailWizard/events/RetailPromotionInstallmentPaidMessage.ts +53 -0
- package/src/retailWizard/events/RetailPromotionQueueMessage.ts +9 -0
- package/src/retailWizard/index.ts +4 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReferralPromotionChannelEnum = void 0;
|
|
4
|
+
/** Dónde vive la promo de referido: en promos de venta o en promos de crédito. */
|
|
5
|
+
var ReferralPromotionChannelEnum;
|
|
6
|
+
(function (ReferralPromotionChannelEnum) {
|
|
7
|
+
ReferralPromotionChannelEnum["SALE"] = "SALE";
|
|
8
|
+
ReferralPromotionChannelEnum["CREDIT"] = "CREDIT";
|
|
9
|
+
})(ReferralPromotionChannelEnum || (exports.ReferralPromotionChannelEnum = ReferralPromotionChannelEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado del premio de referido en el cajón. Del libro: ACCREDITED → PAID; PENDING y UNVERIFIED → PENDING;
|
|
3
|
+
* FAILED o entrega anulada → NOT_APPLICABLE.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ReferralRewardStatusEnum {
|
|
6
|
+
PAID = "PAID",
|
|
7
|
+
PENDING = "PENDING",
|
|
8
|
+
NOT_APPLICABLE = "NOT_APPLICABLE"
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReferralRewardStatusEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Estado del premio de referido en el cajón. Del libro: ACCREDITED → PAID; PENDING y UNVERIFIED → PENDING;
|
|
6
|
+
* FAILED o entrega anulada → NOT_APPLICABLE.
|
|
7
|
+
*/
|
|
8
|
+
var ReferralRewardStatusEnum;
|
|
9
|
+
(function (ReferralRewardStatusEnum) {
|
|
10
|
+
ReferralRewardStatusEnum["PAID"] = "PAID";
|
|
11
|
+
ReferralRewardStatusEnum["PENDING"] = "PENDING";
|
|
12
|
+
ReferralRewardStatusEnum["NOT_APPLICABLE"] = "NOT_APPLICABLE";
|
|
13
|
+
})(ReferralRewardStatusEnum || (exports.ReferralRewardStatusEnum = ReferralRewardStatusEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Premio de referido: bono fijo o % de lo que paga el referido (con tope) a cuenta PCF, cupón (solo venta)
|
|
3
|
+
* o descuento en esta venta (solo el recomendado, solo venta).
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ReferralRewardTypeEnum {
|
|
6
|
+
FIXED_BONUS = "FIXED_BONUS",
|
|
7
|
+
PERCENT_BONUS = "PERCENT_BONUS",
|
|
8
|
+
COUPON = "COUPON",
|
|
9
|
+
SALE_DISCOUNT = "SALE_DISCOUNT"
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReferralRewardTypeEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Premio de referido: bono fijo o % de lo que paga el referido (con tope) a cuenta PCF, cupón (solo venta)
|
|
6
|
+
* o descuento en esta venta (solo el recomendado, solo venta).
|
|
7
|
+
*/
|
|
8
|
+
var ReferralRewardTypeEnum;
|
|
9
|
+
(function (ReferralRewardTypeEnum) {
|
|
10
|
+
ReferralRewardTypeEnum["FIXED_BONUS"] = "FIXED_BONUS";
|
|
11
|
+
ReferralRewardTypeEnum["PERCENT_BONUS"] = "PERCENT_BONUS";
|
|
12
|
+
ReferralRewardTypeEnum["COUPON"] = "COUPON";
|
|
13
|
+
ReferralRewardTypeEnum["SALE_DISCOUNT"] = "SALE_DISCOUNT";
|
|
14
|
+
})(ReferralRewardTypeEnum || (exports.ReferralRewardTypeEnum = ReferralRewardTypeEnum = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evento del referido que paga la promo. Venta: FIRST_PURCHASE, ACCOUNT_OPENED, ANY_PURCHASE, NTH_PURCHASE.
|
|
3
|
+
* Crédito: CREDIT_ACTIVATED, FIRST_INSTALLMENT, INSTALLMENT_STREAK.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ReferralTriggerEnum {
|
|
6
|
+
FIRST_PURCHASE = "FIRST_PURCHASE",
|
|
7
|
+
ACCOUNT_OPENED = "ACCOUNT_OPENED",
|
|
8
|
+
ANY_PURCHASE = "ANY_PURCHASE",
|
|
9
|
+
NTH_PURCHASE = "NTH_PURCHASE",
|
|
10
|
+
CREDIT_ACTIVATED = "CREDIT_ACTIVATED",
|
|
11
|
+
FIRST_INSTALLMENT = "FIRST_INSTALLMENT",
|
|
12
|
+
INSTALLMENT_STREAK = "INSTALLMENT_STREAK"
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReferralTriggerEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Evento del referido que paga la promo. Venta: FIRST_PURCHASE, ACCOUNT_OPENED, ANY_PURCHASE, NTH_PURCHASE.
|
|
6
|
+
* Crédito: CREDIT_ACTIVATED, FIRST_INSTALLMENT, INSTALLMENT_STREAK.
|
|
7
|
+
*/
|
|
8
|
+
var ReferralTriggerEnum;
|
|
9
|
+
(function (ReferralTriggerEnum) {
|
|
10
|
+
ReferralTriggerEnum["FIRST_PURCHASE"] = "FIRST_PURCHASE";
|
|
11
|
+
ReferralTriggerEnum["ACCOUNT_OPENED"] = "ACCOUNT_OPENED";
|
|
12
|
+
ReferralTriggerEnum["ANY_PURCHASE"] = "ANY_PURCHASE";
|
|
13
|
+
ReferralTriggerEnum["NTH_PURCHASE"] = "NTH_PURCHASE";
|
|
14
|
+
ReferralTriggerEnum["CREDIT_ACTIVATED"] = "CREDIT_ACTIVATED";
|
|
15
|
+
ReferralTriggerEnum["FIRST_INSTALLMENT"] = "FIRST_INSTALLMENT";
|
|
16
|
+
ReferralTriggerEnum["INSTALLMENT_STREAK"] = "INSTALLMENT_STREAK";
|
|
17
|
+
})(ReferralTriggerEnum || (exports.ReferralTriggerEnum = ReferralTriggerEnum = {}));
|
|
@@ -52,5 +52,9 @@ export declare enum RetailPromotionsErrorCodeEnum {
|
|
|
52
52
|
/** La promo de sistema solo admite pausar y reanudar. */
|
|
53
53
|
SYSTEM_PROMOTION_TRANSITION_NOT_ALLOWED = "SYSTEM_PROMOTION_TRANSITION_NOT_ALLOWED",
|
|
54
54
|
/** De la promo de sistema solo se edita el monto del bono. */
|
|
55
|
-
SYSTEM_PROMOTION_FIELD_LOCKED = "SYSTEM_PROMOTION_FIELD_LOCKED"
|
|
55
|
+
SYSTEM_PROMOTION_FIELD_LOCKED = "SYSTEM_PROMOTION_FIELD_LOCKED",
|
|
56
|
+
/** La promo de apertura de cuenta eligió un premio que depende de la compra. */
|
|
57
|
+
REFERRAL_REWARD_NEEDS_PURCHASE = "REFERRAL_REWARD_NEEDS_PURCHASE",
|
|
58
|
+
/** Evento de referido inválido: compra N o racha menor a 2, o evento de otro canal. */
|
|
59
|
+
INVALID_REFERRAL_TRIGGER = "INVALID_REFERRAL_TRIGGER"
|
|
56
60
|
}
|
|
@@ -57,4 +57,8 @@ var RetailPromotionsErrorCodeEnum;
|
|
|
57
57
|
RetailPromotionsErrorCodeEnum["SYSTEM_PROMOTION_TRANSITION_NOT_ALLOWED"] = "SYSTEM_PROMOTION_TRANSITION_NOT_ALLOWED";
|
|
58
58
|
/** De la promo de sistema solo se edita el monto del bono. */
|
|
59
59
|
RetailPromotionsErrorCodeEnum["SYSTEM_PROMOTION_FIELD_LOCKED"] = "SYSTEM_PROMOTION_FIELD_LOCKED";
|
|
60
|
+
/** La promo de apertura de cuenta eligió un premio que depende de la compra. */
|
|
61
|
+
RetailPromotionsErrorCodeEnum["REFERRAL_REWARD_NEEDS_PURCHASE"] = "REFERRAL_REWARD_NEEDS_PURCHASE";
|
|
62
|
+
/** Evento de referido inválido: compra N o racha menor a 2, o evento de otro canal. */
|
|
63
|
+
RetailPromotionsErrorCodeEnum["INVALID_REFERRAL_TRIGGER"] = "INVALID_REFERRAL_TRIGGER";
|
|
60
64
|
})(RetailPromotionsErrorCodeEnum || (exports.RetailPromotionsErrorCodeEnum = RetailPromotionsErrorCodeEnum = {}));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tipo de promo
|
|
2
|
+
* Tipo de promo: GIFT solo trae regalo y va ligada al teléfono; REFERRAL premia por un referido; SALE es cualquier otra.
|
|
3
3
|
* @enum {string}
|
|
4
4
|
*/
|
|
5
5
|
export declare enum SalePromotionKindEnum {
|
|
6
6
|
GIFT = "GIFT",
|
|
7
|
-
SALE = "SALE"
|
|
7
|
+
SALE = "SALE",
|
|
8
|
+
REFERRAL = "REFERRAL"
|
|
8
9
|
}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SalePromotionKindEnum = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Tipo de promo
|
|
5
|
+
* Tipo de promo: GIFT solo trae regalo y va ligada al teléfono; REFERRAL premia por un referido; SALE es cualquier otra.
|
|
6
6
|
* @enum {string}
|
|
7
7
|
*/
|
|
8
8
|
var SalePromotionKindEnum;
|
|
9
9
|
(function (SalePromotionKindEnum) {
|
|
10
10
|
SalePromotionKindEnum["GIFT"] = "GIFT";
|
|
11
11
|
SalePromotionKindEnum["SALE"] = "SALE";
|
|
12
|
+
SalePromotionKindEnum["REFERRAL"] = "REFERRAL";
|
|
12
13
|
})(SalePromotionKindEnum || (exports.SalePromotionKindEnum = SalePromotionKindEnum = {}));
|
|
@@ -20,6 +20,10 @@ export * from './enums/RetailPromotionsErrorCodeEnum';
|
|
|
20
20
|
export * from './enums/SalePromotionKindEnum';
|
|
21
21
|
export * from './enums/SkuSalePromotionLookupStatusEnum';
|
|
22
22
|
export * from './enums/SalePromotionSystemKeyEnum';
|
|
23
|
+
export * from './enums/ReferralPromotionChannelEnum';
|
|
24
|
+
export * from './enums/ReferralTriggerEnum';
|
|
25
|
+
export * from './enums/ReferralRewardTypeEnum';
|
|
26
|
+
export * from './enums/ReferralRewardStatusEnum';
|
|
23
27
|
export * from './constants/retailPromotionsErrorHttpStatus';
|
|
24
28
|
export * from './constants/salePromotionTransitions';
|
|
25
29
|
export * from './constants/bonusPreMoney';
|
|
@@ -35,10 +39,12 @@ export * from './dtos/DiscountCode';
|
|
|
35
39
|
export * from './dtos/LinePromotionDiscount';
|
|
36
40
|
export * from './dtos/LinePromotionAmount';
|
|
37
41
|
export * from './dtos/SalePromotionRef';
|
|
42
|
+
export * from './dtos/ReferralPromotion';
|
|
38
43
|
export * from './validators/IsHoldModeExclusiveConstraint';
|
|
39
44
|
export * from './dtos/requests/DiscountValueInput';
|
|
40
45
|
export * from './dtos/requests/SalePromotionLeversInput';
|
|
41
46
|
export * from './dtos/requests/SalePromotionScopeInput';
|
|
47
|
+
export * from './dtos/requests/ReferralPromotionInput';
|
|
42
48
|
export * from './dtos/requests/CreateSalePromotionRequest';
|
|
43
49
|
export * from './dtos/requests/UpdateSalePromotionRequest';
|
|
44
50
|
export * from './dtos/requests/ChangeSalePromotionStatusRequest';
|
|
@@ -55,6 +61,8 @@ export * from './dtos/requests/HoldSalePromotionRequest';
|
|
|
55
61
|
export * from './dtos/requests/GetSaleCouponQuery';
|
|
56
62
|
export * from './dtos/requests/SkuSalePromotionsQuery';
|
|
57
63
|
export * from './dtos/requests/ActiveSalePromotionsBySkusRequest';
|
|
64
|
+
export * from './dtos/requests/CheckSalePromotionPaymentRequest';
|
|
65
|
+
export * from './dtos/requests/GetReferralRewardsByPhonesRequest';
|
|
58
66
|
export * from './dtos/responses/SalePromotionCrudResponses';
|
|
59
67
|
export * from './dtos/responses/DiscountCodeResponses';
|
|
60
68
|
export * from './dtos/responses/WizardSalePromotionResponses';
|
|
@@ -62,3 +70,5 @@ export * from './dtos/responses/SkuSalePromotionsResponse';
|
|
|
62
70
|
export * from './dtos/responses/SalePromotionSegmentsResponse';
|
|
63
71
|
export * from './dtos/responses/ActiveSalePromotionsBySkusResponse';
|
|
64
72
|
export * from './dtos/responses/WelcomeBonusPromotionResponse';
|
|
73
|
+
export * from './dtos/responses/SalePromotionPaymentCheckResponses';
|
|
74
|
+
export * from './dtos/responses/ReferralRewardsByPhonesResponses';
|
|
@@ -37,6 +37,10 @@ __exportStar(require("./enums/RetailPromotionsErrorCodeEnum"), exports);
|
|
|
37
37
|
__exportStar(require("./enums/SalePromotionKindEnum"), exports);
|
|
38
38
|
__exportStar(require("./enums/SkuSalePromotionLookupStatusEnum"), exports);
|
|
39
39
|
__exportStar(require("./enums/SalePromotionSystemKeyEnum"), exports);
|
|
40
|
+
__exportStar(require("./enums/ReferralPromotionChannelEnum"), exports);
|
|
41
|
+
__exportStar(require("./enums/ReferralTriggerEnum"), exports);
|
|
42
|
+
__exportStar(require("./enums/ReferralRewardTypeEnum"), exports);
|
|
43
|
+
__exportStar(require("./enums/ReferralRewardStatusEnum"), exports);
|
|
40
44
|
// Constantes y helpers puros
|
|
41
45
|
__exportStar(require("./constants/retailPromotionsErrorHttpStatus"), exports);
|
|
42
46
|
__exportStar(require("./constants/salePromotionTransitions"), exports);
|
|
@@ -54,12 +58,14 @@ __exportStar(require("./dtos/DiscountCode"), exports);
|
|
|
54
58
|
__exportStar(require("./dtos/LinePromotionDiscount"), exports);
|
|
55
59
|
__exportStar(require("./dtos/LinePromotionAmount"), exports);
|
|
56
60
|
__exportStar(require("./dtos/SalePromotionRef"), exports);
|
|
61
|
+
__exportStar(require("./dtos/ReferralPromotion"), exports);
|
|
57
62
|
// Validadores
|
|
58
63
|
__exportStar(require("./validators/IsHoldModeExclusiveConstraint"), exports);
|
|
59
64
|
// Request DTOs
|
|
60
65
|
__exportStar(require("./dtos/requests/DiscountValueInput"), exports);
|
|
61
66
|
__exportStar(require("./dtos/requests/SalePromotionLeversInput"), exports);
|
|
62
67
|
__exportStar(require("./dtos/requests/SalePromotionScopeInput"), exports);
|
|
68
|
+
__exportStar(require("./dtos/requests/ReferralPromotionInput"), exports);
|
|
63
69
|
__exportStar(require("./dtos/requests/CreateSalePromotionRequest"), exports);
|
|
64
70
|
__exportStar(require("./dtos/requests/UpdateSalePromotionRequest"), exports);
|
|
65
71
|
__exportStar(require("./dtos/requests/ChangeSalePromotionStatusRequest"), exports);
|
|
@@ -76,6 +82,8 @@ __exportStar(require("./dtos/requests/HoldSalePromotionRequest"), exports);
|
|
|
76
82
|
__exportStar(require("./dtos/requests/GetSaleCouponQuery"), exports);
|
|
77
83
|
__exportStar(require("./dtos/requests/SkuSalePromotionsQuery"), exports);
|
|
78
84
|
__exportStar(require("./dtos/requests/ActiveSalePromotionsBySkusRequest"), exports);
|
|
85
|
+
__exportStar(require("./dtos/requests/CheckSalePromotionPaymentRequest"), exports);
|
|
86
|
+
__exportStar(require("./dtos/requests/GetReferralRewardsByPhonesRequest"), exports);
|
|
79
87
|
// Response DTOs
|
|
80
88
|
__exportStar(require("./dtos/responses/SalePromotionCrudResponses"), exports);
|
|
81
89
|
__exportStar(require("./dtos/responses/DiscountCodeResponses"), exports);
|
|
@@ -84,3 +92,5 @@ __exportStar(require("./dtos/responses/SkuSalePromotionsResponse"), exports);
|
|
|
84
92
|
__exportStar(require("./dtos/responses/SalePromotionSegmentsResponse"), exports);
|
|
85
93
|
__exportStar(require("./dtos/responses/ActiveSalePromotionsBySkusResponse"), exports);
|
|
86
94
|
__exportStar(require("./dtos/responses/WelcomeBonusPromotionResponse"), exports);
|
|
95
|
+
__exportStar(require("./dtos/responses/SalePromotionPaymentCheckResponses"), exports);
|
|
96
|
+
__exportStar(require("./dtos/responses/ReferralRewardsByPhonesResponses"), exports);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ReferralRoleEnum } from '../../../retailCustomer/enums/ReferralRoleEnum';
|
|
2
|
+
import { ReferralSourceEnum } from '../../../retailCustomer/enums/ReferralSourceEnum';
|
|
3
|
+
import { ReferralStatusEnum } from '../../../retailCustomer/enums/ReferralStatusEnum';
|
|
4
|
+
import { ReferralRewardStatusEnum } from '../../../retailPromotions/enums/ReferralRewardStatusEnum';
|
|
5
|
+
import { ReferralRewardTypeEnum } from '../../../retailPromotions/enums/ReferralRewardTypeEnum';
|
|
6
|
+
/** Premio de referido que muestra el cajón. */
|
|
7
|
+
export interface BackofficeReferralReward {
|
|
8
|
+
promotionId: string;
|
|
9
|
+
promotionName: string;
|
|
10
|
+
role: ReferralRoleEnum;
|
|
11
|
+
rewardType: ReferralRewardTypeEnum;
|
|
12
|
+
amountCents: number | null;
|
|
13
|
+
status: ReferralRewardStatusEnum;
|
|
14
|
+
/** Fecha del estado: pago, reserva o anulación. */
|
|
15
|
+
statusAt: string;
|
|
16
|
+
}
|
|
17
|
+
/** Dónde, cuándo y quién capturó el referido. */
|
|
18
|
+
export interface BackofficeReferralCapture {
|
|
19
|
+
source: ReferralSourceEnum;
|
|
20
|
+
/** `null` si se agregó en el cajón. */
|
|
21
|
+
storeId: string | null;
|
|
22
|
+
storeName: string | null;
|
|
23
|
+
/** Solo en `SALE`. */
|
|
24
|
+
saleId: string | null;
|
|
25
|
+
saleFolio: string | null;
|
|
26
|
+
/** Solo en `OPENING`. */
|
|
27
|
+
accountOpeningSessionId: string | null;
|
|
28
|
+
capturedBy: string;
|
|
29
|
+
capturedAt: string;
|
|
30
|
+
}
|
|
31
|
+
/** Referido del cliente en el cajón. */
|
|
32
|
+
export interface BackofficeCustomerReferral {
|
|
33
|
+
referralId: string;
|
|
34
|
+
name: string;
|
|
35
|
+
phone: string;
|
|
36
|
+
email: string | null;
|
|
37
|
+
status: ReferralStatusEnum;
|
|
38
|
+
capture: BackofficeReferralCapture;
|
|
39
|
+
updatedBy: string;
|
|
40
|
+
updatedAt: string;
|
|
41
|
+
/** Premios de quien recomienda por este referido; ausente si la ruta aún no los consulta. */
|
|
42
|
+
rewards?: BackofficeReferralReward[];
|
|
43
|
+
}
|
|
44
|
+
/** Quién recomendó al cliente y, opcional, lo que ganó él. */
|
|
45
|
+
export interface BackofficeReferredBy {
|
|
46
|
+
referralId: string;
|
|
47
|
+
referrerCustomerId: string;
|
|
48
|
+
referrerName: string;
|
|
49
|
+
referredAt: string;
|
|
50
|
+
/** Premios del cliente como recomendado, con su promo. */
|
|
51
|
+
rewards?: BackofficeReferralReward[];
|
|
52
|
+
}
|
|
53
|
+
/** GET /backoffice/customers/{retailCustomerId}/referrals — pestaña Referidos del cajón. */
|
|
54
|
+
export interface BackofficeCustomerReferralsResponse {
|
|
55
|
+
referrals: BackofficeCustomerReferral[];
|
|
56
|
+
/** `null` si el cliente no llegó recomendado. */
|
|
57
|
+
referredBy: BackofficeReferredBy | null;
|
|
58
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/** Tipo de mensaje
|
|
1
|
+
/** Tipo de mensaje en la cola de Promociones: venta y apertura los publica el wizard; la cuota, loan-credit. */
|
|
2
2
|
export declare enum RetailPromotionInboundMessageTypeEnum {
|
|
3
3
|
SALE_CONFIRMED = "SALE_CONFIRMED",
|
|
4
|
-
SALE_CANCELLED = "SALE_CANCELLED"
|
|
4
|
+
SALE_CANCELLED = "SALE_CANCELLED",
|
|
5
|
+
ACCOUNT_OPENED = "ACCOUNT_OPENED",
|
|
6
|
+
CREDIT_INSTALLMENT_PAID = "CREDIT_INSTALLMENT_PAID"
|
|
5
7
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RetailPromotionInboundMessageTypeEnum = void 0;
|
|
4
|
-
/** Tipo de mensaje
|
|
4
|
+
/** Tipo de mensaje en la cola de Promociones: venta y apertura los publica el wizard; la cuota, loan-credit. */
|
|
5
5
|
var RetailPromotionInboundMessageTypeEnum;
|
|
6
6
|
(function (RetailPromotionInboundMessageTypeEnum) {
|
|
7
7
|
RetailPromotionInboundMessageTypeEnum["SALE_CONFIRMED"] = "SALE_CONFIRMED";
|
|
8
8
|
RetailPromotionInboundMessageTypeEnum["SALE_CANCELLED"] = "SALE_CANCELLED";
|
|
9
|
+
RetailPromotionInboundMessageTypeEnum["ACCOUNT_OPENED"] = "ACCOUNT_OPENED";
|
|
10
|
+
RetailPromotionInboundMessageTypeEnum["CREDIT_INSTALLMENT_PAID"] = "CREDIT_INSTALLMENT_PAID";
|
|
9
11
|
})(RetailPromotionInboundMessageTypeEnum || (exports.RetailPromotionInboundMessageTypeEnum = RetailPromotionInboundMessageTypeEnum = {}));
|
|
@@ -14,4 +14,6 @@ var WizardStepEnum;
|
|
|
14
14
|
WizardStepEnum["S08"] = "S08";
|
|
15
15
|
WizardStepEnum["S09"] = "S09";
|
|
16
16
|
WizardStepEnum["S10"] = "S10";
|
|
17
|
+
/** Referidos: tras firma o cobro en la venta, tras cuenta abierta en la apertura; el orden lo da el camino. */
|
|
18
|
+
WizardStepEnum["S11"] = "S11";
|
|
17
19
|
})(WizardStepEnum || (exports.WizardStepEnum = WizardStepEnum = {}));
|
|
@@ -24,6 +24,11 @@ export declare class RetailCommissionInboundLine {
|
|
|
24
24
|
/** Teléfonos que trae la línea (kit), congelados al cerrar; ausente en mensajes viejos. */
|
|
25
25
|
phoneCount?: number;
|
|
26
26
|
}
|
|
27
|
+
/** Referido capturado en la venta, con quien lo capturó para su comisión. */
|
|
28
|
+
export declare class RetailCommissionInboundReferral {
|
|
29
|
+
referralId: string;
|
|
30
|
+
capturedBy: string;
|
|
31
|
+
}
|
|
27
32
|
/** Venta cerrada o cancelada que el wizard publica en RetailCommissionInboundQueue. */
|
|
28
33
|
export declare class RetailCommissionInboundMessage {
|
|
29
34
|
type: RetailCommissionInboundMessageTypeEnum;
|
|
@@ -44,4 +49,6 @@ export declare class RetailCommissionInboundMessage {
|
|
|
44
49
|
/** Motivo de la cancelación; puede venir vacío. */
|
|
45
50
|
cancelReason?: string;
|
|
46
51
|
lines: RetailCommissionInboundLine[];
|
|
52
|
+
/** Referidos capturados en la venta; ausente en mensajes viejos. */
|
|
53
|
+
referrals?: RetailCommissionInboundReferral[];
|
|
47
54
|
}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.RetailCommissionInboundMessage = exports.RetailCommissionInboundLine = void 0;
|
|
12
|
+
exports.RetailCommissionInboundMessage = exports.RetailCommissionInboundReferral = exports.RetailCommissionInboundLine = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const ItemTypeEnum_1 = require("../../retailCatalog/enums/ItemTypeEnum");
|
|
@@ -78,6 +78,20 @@ __decorate([
|
|
|
78
78
|
(0, class_validator_1.Min)(0),
|
|
79
79
|
__metadata("design:type", Number)
|
|
80
80
|
], RetailCommissionInboundLine.prototype, "phoneCount", void 0);
|
|
81
|
+
/** Referido capturado en la venta, con quien lo capturó para su comisión. */
|
|
82
|
+
class RetailCommissionInboundReferral {
|
|
83
|
+
}
|
|
84
|
+
exports.RetailCommissionInboundReferral = RetailCommissionInboundReferral;
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_validator_1.IsString)(),
|
|
87
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], RetailCommissionInboundReferral.prototype, "referralId", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, class_validator_1.IsString)(),
|
|
92
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], RetailCommissionInboundReferral.prototype, "capturedBy", void 0);
|
|
81
95
|
/** Venta cerrada o cancelada que el wizard publica en RetailCommissionInboundQueue. */
|
|
82
96
|
class RetailCommissionInboundMessage {
|
|
83
97
|
}
|
|
@@ -151,3 +165,10 @@ __decorate([
|
|
|
151
165
|
(0, class_transformer_1.Type)(() => RetailCommissionInboundLine),
|
|
152
166
|
__metadata("design:type", Array)
|
|
153
167
|
], RetailCommissionInboundMessage.prototype, "lines", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, class_validator_1.IsOptional)(),
|
|
170
|
+
(0, class_validator_1.IsArray)(),
|
|
171
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
172
|
+
(0, class_transformer_1.Type)(() => RetailCommissionInboundReferral),
|
|
173
|
+
__metadata("design:type", Array)
|
|
174
|
+
], RetailCommissionInboundMessage.prototype, "referrals", void 0);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RetailPromotionInboundMessageTypeEnum } from '../enums/RetailPromotionInboundMessageTypeEnum';
|
|
2
|
+
/** Cuenta PCF que quedó OPEN (LINKED no cuenta); el wizard la publica en RetailPromotionInboundQueue. */
|
|
3
|
+
export declare class RetailPromotionAccountOpenedMessage {
|
|
4
|
+
type: RetailPromotionInboundMessageTypeEnum.ACCOUNT_OPENED;
|
|
5
|
+
tenantId: string;
|
|
6
|
+
retailerId: string;
|
|
7
|
+
storeId: string;
|
|
8
|
+
/** El retailCustomerId de quien abrió la cuenta. */
|
|
9
|
+
customerId: string;
|
|
10
|
+
/** Teléfono a 10 dígitos: con él se busca al referidor. */
|
|
11
|
+
phone: string;
|
|
12
|
+
/** Sesión del wizard donde se abrió la cuenta. */
|
|
13
|
+
sessionId: string;
|
|
14
|
+
openedAt: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.RetailPromotionAccountOpenedMessage = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const RetailPromotionInboundMessageTypeEnum_1 = require("../enums/RetailPromotionInboundMessageTypeEnum");
|
|
15
|
+
/** Cuenta PCF que quedó OPEN (LINKED no cuenta); el wizard la publica en RetailPromotionInboundQueue. */
|
|
16
|
+
class RetailPromotionAccountOpenedMessage {
|
|
17
|
+
}
|
|
18
|
+
exports.RetailPromotionAccountOpenedMessage = RetailPromotionAccountOpenedMessage;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.Equals)(RetailPromotionInboundMessageTypeEnum_1.RetailPromotionInboundMessageTypeEnum.ACCOUNT_OPENED),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], RetailPromotionAccountOpenedMessage.prototype, "type", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], RetailPromotionAccountOpenedMessage.prototype, "tenantId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], RetailPromotionAccountOpenedMessage.prototype, "retailerId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], RetailPromotionAccountOpenedMessage.prototype, "storeId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], RetailPromotionAccountOpenedMessage.prototype, "customerId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], RetailPromotionAccountOpenedMessage.prototype, "phone", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], RetailPromotionAccountOpenedMessage.prototype, "sessionId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsISO8601)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], RetailPromotionAccountOpenedMessage.prototype, "openedAt", void 0);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { LinePromotionAmount } from '../../retailPromotions/dtos/LinePromotionAmount';
|
|
2
2
|
import { SalePromotionRef } from '../../retailPromotions/dtos/SalePromotionRef';
|
|
3
|
+
import { ExternalProviderEnum } from '../enums/ExternalProviderEnum';
|
|
3
4
|
import { RetailPromotionInboundMessageTypeEnum } from '../enums/RetailPromotionInboundMessageTypeEnum';
|
|
5
|
+
import { SalePaymentMethodEnum } from '../enums/SalePaymentMethodEnum';
|
|
6
|
+
import { SaleTypeEnum } from '../enums/SaleTypeEnum';
|
|
4
7
|
import { WizardLineRoleEnum } from '../enums/WizardLineRoleEnum';
|
|
5
8
|
/** Línea de la venta en el mensaje de Promociones. */
|
|
6
9
|
export declare class RetailPromotionInboundLine {
|
|
@@ -45,4 +48,16 @@ export declare class RetailPromotionInboundMessage {
|
|
|
45
48
|
/** Todas las promos de venta de la venta; `salePromotionId` queda como la principal. */
|
|
46
49
|
salePromotions?: SalePromotionRef[] | null;
|
|
47
50
|
lines: RetailPromotionInboundLine[];
|
|
51
|
+
/** Forma de pago; ausente en mensajes viejos. */
|
|
52
|
+
saleType?: SaleTypeEnum;
|
|
53
|
+
/** Medio de cobro, solo en contado. */
|
|
54
|
+
paymentMethod?: SalePaymentMethodEnum | null;
|
|
55
|
+
/** Financiera externa, solo en `EXTERNAL_REFERRAL`. */
|
|
56
|
+
externalProvider?: ExternalProviderEnum | null;
|
|
57
|
+
/** Precio del equipo en centavos; en crédito no es el enganche. */
|
|
58
|
+
amountCents?: number;
|
|
59
|
+
/** 1 + ventas no canceladas del cliente en la cadena. */
|
|
60
|
+
purchaseNumber?: number;
|
|
61
|
+
/** Teléfono del cliente a 10 dígitos. */
|
|
62
|
+
phone?: string;
|
|
48
63
|
}
|
|
@@ -14,7 +14,10 @@ const class_transformer_1 = require("class-transformer");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const LinePromotionAmount_1 = require("../../retailPromotions/dtos/LinePromotionAmount");
|
|
16
16
|
const SalePromotionRef_1 = require("../../retailPromotions/dtos/SalePromotionRef");
|
|
17
|
+
const ExternalProviderEnum_1 = require("../enums/ExternalProviderEnum");
|
|
17
18
|
const RetailPromotionInboundMessageTypeEnum_1 = require("../enums/RetailPromotionInboundMessageTypeEnum");
|
|
19
|
+
const SalePaymentMethodEnum_1 = require("../enums/SalePaymentMethodEnum");
|
|
20
|
+
const SaleTypeEnum_1 = require("../enums/SaleTypeEnum");
|
|
18
21
|
const WizardLineRoleEnum_1 = require("../enums/WizardLineRoleEnum");
|
|
19
22
|
/** Línea de la venta en el mensaje de Promociones. */
|
|
20
23
|
class RetailPromotionInboundLine {
|
|
@@ -98,12 +101,16 @@ __decorate([
|
|
|
98
101
|
(0, class_validator_1.IsBoolean)(),
|
|
99
102
|
__metadata("design:type", Boolean)
|
|
100
103
|
], RetailPromotionInboundLine.prototype, "returned", void 0);
|
|
104
|
+
const SALE_MESSAGE_TYPES = [
|
|
105
|
+
RetailPromotionInboundMessageTypeEnum_1.RetailPromotionInboundMessageTypeEnum.SALE_CONFIRMED,
|
|
106
|
+
RetailPromotionInboundMessageTypeEnum_1.RetailPromotionInboundMessageTypeEnum.SALE_CANCELLED,
|
|
107
|
+
];
|
|
101
108
|
/** Venta confirmada o cancelada que el wizard publica en RetailPromotionInboundQueue; crédito = trae creditId. */
|
|
102
109
|
class RetailPromotionInboundMessage {
|
|
103
110
|
}
|
|
104
111
|
exports.RetailPromotionInboundMessage = RetailPromotionInboundMessage;
|
|
105
112
|
__decorate([
|
|
106
|
-
(0, class_validator_1.
|
|
113
|
+
(0, class_validator_1.IsIn)(SALE_MESSAGE_TYPES),
|
|
107
114
|
__metadata("design:type", String)
|
|
108
115
|
], RetailPromotionInboundMessage.prototype, "type", void 0);
|
|
109
116
|
__decorate([
|
|
@@ -182,3 +189,36 @@ __decorate([
|
|
|
182
189
|
(0, class_transformer_1.Type)(() => RetailPromotionInboundLine),
|
|
183
190
|
__metadata("design:type", Array)
|
|
184
191
|
], RetailPromotionInboundMessage.prototype, "lines", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, class_validator_1.IsOptional)(),
|
|
194
|
+
(0, class_validator_1.IsEnum)(SaleTypeEnum_1.SaleTypeEnum),
|
|
195
|
+
__metadata("design:type", String)
|
|
196
|
+
], RetailPromotionInboundMessage.prototype, "saleType", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, class_validator_1.IsOptional)(),
|
|
199
|
+
(0, class_validator_1.IsEnum)(SalePaymentMethodEnum_1.SalePaymentMethodEnum),
|
|
200
|
+
__metadata("design:type", String)
|
|
201
|
+
], RetailPromotionInboundMessage.prototype, "paymentMethod", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
(0, class_validator_1.IsOptional)(),
|
|
204
|
+
(0, class_validator_1.IsEnum)(ExternalProviderEnum_1.ExternalProviderEnum),
|
|
205
|
+
__metadata("design:type", String)
|
|
206
|
+
], RetailPromotionInboundMessage.prototype, "externalProvider", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
(0, class_validator_1.IsOptional)(),
|
|
209
|
+
(0, class_validator_1.IsInt)(),
|
|
210
|
+
(0, class_validator_1.Min)(0),
|
|
211
|
+
__metadata("design:type", Number)
|
|
212
|
+
], RetailPromotionInboundMessage.prototype, "amountCents", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, class_validator_1.IsOptional)(),
|
|
215
|
+
(0, class_validator_1.IsInt)(),
|
|
216
|
+
(0, class_validator_1.Min)(1),
|
|
217
|
+
__metadata("design:type", Number)
|
|
218
|
+
], RetailPromotionInboundMessage.prototype, "purchaseNumber", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
(0, class_validator_1.IsOptional)(),
|
|
221
|
+
(0, class_validator_1.IsString)(),
|
|
222
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
223
|
+
__metadata("design:type", String)
|
|
224
|
+
], RetailPromotionInboundMessage.prototype, "phone", void 0);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LoanInstallmentStatusEnum } from '../../loanCredit/enums/LoanInstallmentStatusEnum';
|
|
2
|
+
import { RetailPromotionInboundMessageTypeEnum } from '../enums/RetailPromotionInboundMessageTypeEnum';
|
|
3
|
+
/** Cuota pagada que loan-credit publica en RetailPromotionInboundQueue: `InstallmentPaidV1` + contexto. Sin PII. */
|
|
4
|
+
export declare class RetailPromotionInstallmentPaidMessage {
|
|
5
|
+
type: RetailPromotionInboundMessageTypeEnum.CREDIT_INSTALLMENT_PAID;
|
|
6
|
+
tenantId: string;
|
|
7
|
+
creditId: string;
|
|
8
|
+
installmentNumber: number;
|
|
9
|
+
/** Lo pagado de la cuota en total, en centavos. */
|
|
10
|
+
paidCents: number;
|
|
11
|
+
paidAt: string;
|
|
12
|
+
installmentStatus: LoanInstallmentStatusEnum;
|
|
13
|
+
paymentId: string;
|
|
14
|
+
wizardSessionId: string;
|
|
15
|
+
storeId: string;
|
|
16
|
+
/** Pagada a más tardar en su vencimiento. */
|
|
17
|
+
onTime: boolean;
|
|
18
|
+
/** Cuotas seguidas a tiempo hasta esta, incluida; 0 si esta fue tarde. */
|
|
19
|
+
onTimeStreak: number;
|
|
20
|
+
}
|