@fiado/type-kit 3.564.0 → 3.566.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/referralWizardContracts.test.ts +119 -0
- package/_test_/unit/retailPromotions/salePromotionPaymentCheck.test.ts +29 -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 +6 -0
- package/bin/retailPromotions/dtos/requests/CheckSalePromotionPaymentRequest.js +25 -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/EvaluateSalePromotionsRequest.d.ts +2 -0
- package/bin/retailPromotions/dtos/requests/EvaluateSalePromotionsRequest.js +7 -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/ListLiveReferralPromotionsQuery.d.ts +10 -0
- package/bin/retailPromotions/dtos/requests/ListLiveReferralPromotionsQuery.js +38 -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/LiveReferralPromotionsResponse.d.ts +24 -0
- package/bin/retailPromotions/dtos/responses/LiveReferralPromotionsResponse.js +2 -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/dtos/responses/WizardSalePromotionResponses.d.ts +13 -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 +12 -0
- package/bin/retailPromotions/index.js +12 -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 +12 -0
- package/src/retailPromotions/dtos/requests/CreateSalePromotionRequest.ts +8 -0
- package/src/retailPromotions/dtos/requests/EvaluateSalePromotionsRequest.ts +7 -0
- package/src/retailPromotions/dtos/requests/GetReferralRewardsByPhonesRequest.ts +20 -0
- package/src/retailPromotions/dtos/requests/ListLiveReferralPromotionsQuery.ts +24 -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/LiveReferralPromotionsResponse.ts +26 -0
- package/src/retailPromotions/dtos/responses/ReferralRewardsByPhonesResponses.ts +28 -0
- package/src/retailPromotions/dtos/responses/SalePromotionPaymentCheckResponses.ts +17 -0
- package/src/retailPromotions/dtos/responses/WizardSalePromotionResponses.ts +15 -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 +12 -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,53 @@
|
|
|
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.UpdateCustomerReferralRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const Trim_1 = require("../../../common/decorators/Trim");
|
|
16
|
+
const InputPatterns_1 = require("../../../common/constants/InputPatterns");
|
|
17
|
+
const REFERRAL_NAME_MAX_LENGTH = 120;
|
|
18
|
+
/** Body de `privateUpdateCustomerReferral`: corrige datos sin cambiar dónde se capturó. `email: null` lo quita. */
|
|
19
|
+
class UpdateCustomerReferralRequest {
|
|
20
|
+
}
|
|
21
|
+
exports.UpdateCustomerReferralRequest = UpdateCustomerReferralRequest;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, Trim_1.Trim)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
(0, class_validator_1.MaxLength)(REFERRAL_NAME_MAX_LENGTH),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], UpdateCustomerReferralRequest.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, Trim_1.Trim)(),
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], UpdateCustomerReferralRequest.prototype, "phone", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_transformer_1.Expose)(),
|
|
41
|
+
(0, class_validator_1.ValidateIf)((o) => o.email !== undefined && o.email !== null),
|
|
42
|
+
(0, Trim_1.Trim)(),
|
|
43
|
+
(0, class_validator_1.IsEmail)(),
|
|
44
|
+
(0, class_validator_1.MaxLength)(InputPatterns_1.EMAIL_MAX_LENGTH),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], UpdateCustomerReferralRequest.prototype, "email", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
(0, Trim_1.Trim)(),
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], UpdateCustomerReferralRequest.prototype, "updatedBy", void 0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BonusTypeEnum } from '../../enums/BonusTypeEnum';
|
|
2
|
+
import { ReferralRoleEnum } from '../../enums/ReferralRoleEnum';
|
|
2
3
|
import { WelcomeBonusStatusEnum } from '../../enums/WelcomeBonusStatusEnum';
|
|
3
4
|
/**
|
|
4
5
|
* Asiento de un bono de promoción en el libro de bonos:
|
|
@@ -24,4 +25,7 @@ export declare class UpsertPromotionBonusRequest {
|
|
|
24
25
|
folio?: string;
|
|
25
26
|
wizardSessionId?: string;
|
|
26
27
|
sellerRetailUserId?: string;
|
|
28
|
+
/** Solo en premios de referido: a quién se le paga. */
|
|
29
|
+
role?: ReferralRoleEnum;
|
|
30
|
+
referralId?: string;
|
|
27
31
|
}
|
|
@@ -14,6 +14,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const Trim_1 = require("../../../common/decorators/Trim");
|
|
16
16
|
const BonusTypeEnum_1 = require("../../enums/BonusTypeEnum");
|
|
17
|
+
const ReferralRoleEnum_1 = require("../../enums/ReferralRoleEnum");
|
|
17
18
|
const WelcomeBonusStatusEnum_1 = require("../../enums/WelcomeBonusStatusEnum");
|
|
18
19
|
/** Tope del motivo libre que el caller escribe en el asiento. */
|
|
19
20
|
const FREE_TEXT_MAX_LENGTH = 256;
|
|
@@ -137,3 +138,17 @@ __decorate([
|
|
|
137
138
|
(0, class_validator_1.IsNotEmpty)(),
|
|
138
139
|
__metadata("design:type", String)
|
|
139
140
|
], UpsertPromotionBonusRequest.prototype, "sellerRetailUserId", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, class_transformer_1.Expose)(),
|
|
143
|
+
(0, class_validator_1.IsOptional)(),
|
|
144
|
+
(0, class_validator_1.IsEnum)(ReferralRoleEnum_1.ReferralRoleEnum),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], UpsertPromotionBonusRequest.prototype, "role", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, class_transformer_1.Expose)(),
|
|
149
|
+
(0, class_validator_1.IsOptional)(),
|
|
150
|
+
(0, Trim_1.Trim)(),
|
|
151
|
+
(0, class_validator_1.IsString)(),
|
|
152
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
153
|
+
__metadata("design:type", String)
|
|
154
|
+
], UpsertPromotionBonusRequest.prototype, "referralId", void 0);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CustomerReferral } from '../CustomerReferral';
|
|
2
|
+
import { AccountStatusEnum } from '../../enums/AccountStatusEnum';
|
|
3
|
+
import { ReferralSourceEnum } from '../../enums/ReferralSourceEnum';
|
|
4
|
+
/** Respuesta de `privateCreateCustomerReferrals`. */
|
|
5
|
+
export interface CreateCustomerReferralsResponse {
|
|
6
|
+
referrals: CustomerReferral[];
|
|
7
|
+
}
|
|
8
|
+
/** Respuesta de `privateUpdateCustomerReferral`. */
|
|
9
|
+
export interface UpdateCustomerReferralResponse {
|
|
10
|
+
referral: CustomerReferral;
|
|
11
|
+
}
|
|
12
|
+
/** Respuesta de `privateListCustomerReferrals`. */
|
|
13
|
+
export interface ListCustomerReferralsResponse {
|
|
14
|
+
referrals: CustomerReferral[];
|
|
15
|
+
}
|
|
16
|
+
/** Quién recomendó un teléfono. */
|
|
17
|
+
export interface ReferralByPhone {
|
|
18
|
+
referralId: string;
|
|
19
|
+
referrerCustomerId: string;
|
|
20
|
+
referrerName: string;
|
|
21
|
+
source: ReferralSourceEnum;
|
|
22
|
+
capturedAt: string;
|
|
23
|
+
}
|
|
24
|
+
/** Respuesta de `privateGetReferralsByPhone`, del más antiguo al más reciente. */
|
|
25
|
+
export interface ReferralsByPhoneResponse {
|
|
26
|
+
referrals: ReferralByPhone[];
|
|
27
|
+
}
|
|
28
|
+
/** Teléfono que ya es cliente. */
|
|
29
|
+
export interface CustomerByPhone {
|
|
30
|
+
phone: string;
|
|
31
|
+
retailCustomerId: string;
|
|
32
|
+
retailerId: string;
|
|
33
|
+
/** `null` si la cuenta PCF aún no se pide. */
|
|
34
|
+
accountStatus: AccountStatusEnum | null;
|
|
35
|
+
}
|
|
36
|
+
/** Respuesta de `privateGetCustomersByPhones`; los teléfonos que no son clientes no aparecen. */
|
|
37
|
+
export interface CustomersByPhonesResponse {
|
|
38
|
+
customers: CustomerByPhone[];
|
|
39
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReferralRoleEnum = void 0;
|
|
4
|
+
/** A quién premia una promo de referido: a quien recomienda o al recomendado. */
|
|
5
|
+
var ReferralRoleEnum;
|
|
6
|
+
(function (ReferralRoleEnum) {
|
|
7
|
+
ReferralRoleEnum["REFERRER"] = "REFERRER";
|
|
8
|
+
ReferralRoleEnum["REFERRED"] = "REFERRED";
|
|
9
|
+
})(ReferralRoleEnum || (exports.ReferralRoleEnum = ReferralRoleEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReferralSourceEnum = void 0;
|
|
4
|
+
/** Dónde se capturó un referido: en la venta, en la apertura sin venta o en el cajón del cliente. */
|
|
5
|
+
var ReferralSourceEnum;
|
|
6
|
+
(function (ReferralSourceEnum) {
|
|
7
|
+
ReferralSourceEnum["SALE"] = "SALE";
|
|
8
|
+
ReferralSourceEnum["OPENING"] = "OPENING";
|
|
9
|
+
ReferralSourceEnum["BACKOFFICE"] = "BACKOFFICE";
|
|
10
|
+
})(ReferralSourceEnum || (exports.ReferralSourceEnum = ReferralSourceEnum = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Estado del referido en el cajón: aún no compra, abrió su cuenta, ya compró o tiene crédito SureKeep. */
|
|
2
|
+
export declare enum ReferralStatusEnum {
|
|
3
|
+
NOT_PURCHASED = "NOT_PURCHASED",
|
|
4
|
+
ACCOUNT_OPENED = "ACCOUNT_OPENED",
|
|
5
|
+
PURCHASED = "PURCHASED",
|
|
6
|
+
SUREKEEP_CREDIT = "SUREKEEP_CREDIT"
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReferralStatusEnum = void 0;
|
|
4
|
+
/** Estado del referido en el cajón: aún no compra, abrió su cuenta, ya compró o tiene crédito SureKeep. */
|
|
5
|
+
var ReferralStatusEnum;
|
|
6
|
+
(function (ReferralStatusEnum) {
|
|
7
|
+
ReferralStatusEnum["NOT_PURCHASED"] = "NOT_PURCHASED";
|
|
8
|
+
ReferralStatusEnum["ACCOUNT_OPENED"] = "ACCOUNT_OPENED";
|
|
9
|
+
ReferralStatusEnum["PURCHASED"] = "PURCHASED";
|
|
10
|
+
ReferralStatusEnum["SUREKEEP_CREDIT"] = "SUREKEEP_CREDIT";
|
|
11
|
+
})(ReferralStatusEnum || (exports.ReferralStatusEnum = ReferralStatusEnum = {}));
|
|
@@ -8,9 +8,13 @@ export * from './enums/WelcomeBonusStatusEnum';
|
|
|
8
8
|
export * from './enums/WelcomeBonusAmountSourceEnum';
|
|
9
9
|
export * from './enums/WelcomeBonusSettlementStatusEnum';
|
|
10
10
|
export * from './enums/BonusTypeEnum';
|
|
11
|
+
export * from './enums/ReferralSourceEnum';
|
|
12
|
+
export * from './enums/ReferralStatusEnum';
|
|
13
|
+
export * from './enums/ReferralRoleEnum';
|
|
11
14
|
export * from './dtos/KycReview';
|
|
12
15
|
export * from './dtos/RetailAddress';
|
|
13
16
|
export * from './dtos/RetailCustomer';
|
|
17
|
+
export * from './dtos/CustomerReferral';
|
|
14
18
|
export * from './dtos/requests/CreateCustomerRequest';
|
|
15
19
|
export * from './dtos/requests/UpsertCustomerFromKycRequest';
|
|
16
20
|
export * from './dtos/requests/UpdateCustomerRequest';
|
|
@@ -19,11 +23,16 @@ export * from './dtos/requests/KycReviewRequest';
|
|
|
19
23
|
export * from './dtos/requests/WelcomeAccreditationRequest';
|
|
20
24
|
export * from './dtos/requests/WelcomeAccreditationResultRequest';
|
|
21
25
|
export * from './dtos/requests/UpsertPromotionBonusRequest';
|
|
26
|
+
export * from './dtos/requests/CreateCustomerReferralsRequest';
|
|
27
|
+
export * from './dtos/requests/UpdateCustomerReferralRequest';
|
|
28
|
+
export * from './dtos/requests/GetCustomersByPhonesRequest';
|
|
29
|
+
export * from './dtos/requests/GetReferralsByPhoneQuery';
|
|
22
30
|
export * from './dtos/responses/CustomerResponse';
|
|
23
31
|
export * from './dtos/responses/Customer360Response';
|
|
24
32
|
export * from './dtos/responses/WelcomeBonusResponse';
|
|
25
33
|
export * from './dtos/responses/WelcomeAccreditationResponse';
|
|
26
34
|
export * from './dtos/responses/PromotionBonusEntryResponse';
|
|
35
|
+
export * from './dtos/responses/CustomerReferralResponses';
|
|
27
36
|
export * from './events/CustomerCreatedV1';
|
|
28
37
|
export * from './events/CustomerUpdatedV1';
|
|
29
38
|
export * from './events/CustomerKycVerifiedV1';
|
|
@@ -25,10 +25,14 @@ __exportStar(require("./enums/WelcomeBonusStatusEnum"), exports);
|
|
|
25
25
|
__exportStar(require("./enums/WelcomeBonusAmountSourceEnum"), exports);
|
|
26
26
|
__exportStar(require("./enums/WelcomeBonusSettlementStatusEnum"), exports);
|
|
27
27
|
__exportStar(require("./enums/BonusTypeEnum"), exports);
|
|
28
|
+
__exportStar(require("./enums/ReferralSourceEnum"), exports);
|
|
29
|
+
__exportStar(require("./enums/ReferralStatusEnum"), exports);
|
|
30
|
+
__exportStar(require("./enums/ReferralRoleEnum"), exports);
|
|
28
31
|
// Entidades (planas, con class-validator + @Expose)
|
|
29
32
|
__exportStar(require("./dtos/KycReview"), exports);
|
|
30
33
|
__exportStar(require("./dtos/RetailAddress"), exports);
|
|
31
34
|
__exportStar(require("./dtos/RetailCustomer"), exports);
|
|
35
|
+
__exportStar(require("./dtos/CustomerReferral"), exports);
|
|
32
36
|
// Request DTOs (input validado por endpoint)
|
|
33
37
|
__exportStar(require("./dtos/requests/CreateCustomerRequest"), exports);
|
|
34
38
|
__exportStar(require("./dtos/requests/UpsertCustomerFromKycRequest"), exports);
|
|
@@ -38,12 +42,17 @@ __exportStar(require("./dtos/requests/KycReviewRequest"), exports);
|
|
|
38
42
|
__exportStar(require("./dtos/requests/WelcomeAccreditationRequest"), exports);
|
|
39
43
|
__exportStar(require("./dtos/requests/WelcomeAccreditationResultRequest"), exports);
|
|
40
44
|
__exportStar(require("./dtos/requests/UpsertPromotionBonusRequest"), exports);
|
|
45
|
+
__exportStar(require("./dtos/requests/CreateCustomerReferralsRequest"), exports);
|
|
46
|
+
__exportStar(require("./dtos/requests/UpdateCustomerReferralRequest"), exports);
|
|
47
|
+
__exportStar(require("./dtos/requests/GetCustomersByPhonesRequest"), exports);
|
|
48
|
+
__exportStar(require("./dtos/requests/GetReferralsByPhoneQuery"), exports);
|
|
41
49
|
// Response DTOs
|
|
42
50
|
__exportStar(require("./dtos/responses/CustomerResponse"), exports);
|
|
43
51
|
__exportStar(require("./dtos/responses/Customer360Response"), exports);
|
|
44
52
|
__exportStar(require("./dtos/responses/WelcomeBonusResponse"), exports);
|
|
45
53
|
__exportStar(require("./dtos/responses/WelcomeAccreditationResponse"), exports);
|
|
46
54
|
__exportStar(require("./dtos/responses/PromotionBonusEntryResponse"), exports);
|
|
55
|
+
__exportStar(require("./dtos/responses/CustomerReferralResponses"), exports);
|
|
47
56
|
// Contratos de eventos (PascalCase + sufijo V1)
|
|
48
57
|
__exportStar(require("./events/CustomerCreatedV1"), exports);
|
|
49
58
|
__exportStar(require("./events/CustomerUpdatedV1"), exports);
|
|
@@ -38,4 +38,6 @@ exports.RETAIL_PROMOTIONS_ERROR_HTTP_STATUS = {
|
|
|
38
38
|
[RetailPromotionsErrorCodeEnum_1.RetailPromotionsErrorCodeEnum.PROMOTION_PAYMENT_NOT_ELIGIBLE]: 422,
|
|
39
39
|
[RetailPromotionsErrorCodeEnum_1.RetailPromotionsErrorCodeEnum.SYSTEM_PROMOTION_TRANSITION_NOT_ALLOWED]: 422,
|
|
40
40
|
[RetailPromotionsErrorCodeEnum_1.RetailPromotionsErrorCodeEnum.SYSTEM_PROMOTION_FIELD_LOCKED]: 422,
|
|
41
|
+
[RetailPromotionsErrorCodeEnum_1.RetailPromotionsErrorCodeEnum.REFERRAL_REWARD_NEEDS_PURCHASE]: 422,
|
|
42
|
+
[RetailPromotionsErrorCodeEnum_1.RetailPromotionsErrorCodeEnum.INVALID_REFERRAL_TRIGGER]: 400,
|
|
41
43
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReferralPromotionChannelEnum } from '../enums/ReferralPromotionChannelEnum';
|
|
2
|
+
import { ReferralRewardTypeEnum } from '../enums/ReferralRewardTypeEnum';
|
|
3
|
+
import { ReferralTriggerEnum } from '../enums/ReferralTriggerEnum';
|
|
4
|
+
import { CouponLever } from './SalePromotionLevers';
|
|
5
|
+
/** Premio de un rol; solo trae valor el campo que corresponde a su `type`. */
|
|
6
|
+
export interface ReferralReward {
|
|
7
|
+
type: ReferralRewardTypeEnum;
|
|
8
|
+
/** `FIXED_BONUS`. */
|
|
9
|
+
amountCents: number | null;
|
|
10
|
+
/** `PERCENT_BONUS` y `SALE_DISCOUNT`; 1000 = 10%. */
|
|
11
|
+
percentBps: number | null;
|
|
12
|
+
/** Tope del %; `null` = sin tope. */
|
|
13
|
+
maxAmountCents: number | null;
|
|
14
|
+
/** `COUPON`. */
|
|
15
|
+
coupon: CouponLever | null;
|
|
16
|
+
}
|
|
17
|
+
/** Evento, condiciones y premios de una promo `REFERRAL`; forma de pago, gama, vigencia y presupuesto son los de la promo. */
|
|
18
|
+
export interface ReferralPromotionConfig {
|
|
19
|
+
channel: ReferralPromotionChannelEnum;
|
|
20
|
+
trigger: ReferralTriggerEnum;
|
|
21
|
+
/** Solo en `NTH_PURCHASE`. */
|
|
22
|
+
purchaseNumber: number | null;
|
|
23
|
+
/** Solo en `INSTALLMENT_STREAK`. */
|
|
24
|
+
installmentStreak: number | null;
|
|
25
|
+
/** Monto mínimo de la compra o del crédito. */
|
|
26
|
+
minAmountCents: number | null;
|
|
27
|
+
/** Días desde la captura del referido. */
|
|
28
|
+
windowDays: number | null;
|
|
29
|
+
maxRewardsPerReferrer: number | null;
|
|
30
|
+
referrerReward: ReferralReward;
|
|
31
|
+
/** `null` = el recomendado no gana nada. */
|
|
32
|
+
referredReward: ReferralReward | null;
|
|
33
|
+
}
|
|
@@ -3,6 +3,7 @@ import { PromotionPaymentOptionEnum } from '../enums/PromotionPaymentOptionEnum'
|
|
|
3
3
|
import { SalePromotionPhaseEnum } from '../enums/SalePromotionPhaseEnum';
|
|
4
4
|
import { SalePromotionStatusEnum } from '../enums/SalePromotionStatusEnum';
|
|
5
5
|
import { SalePromotionSystemKeyEnum } from '../enums/SalePromotionSystemKeyEnum';
|
|
6
|
+
import { ReferralPromotionConfig } from './ReferralPromotion';
|
|
6
7
|
import { SalePromotionLevers, SalePromotionScope, SalePromotionSegmentation } from './SalePromotionLevers';
|
|
7
8
|
/** Promo de venta tal como la devuelve el CRUD. Dinero en centavos, fechas ISO. */
|
|
8
9
|
export interface SalePromotion {
|
|
@@ -30,6 +31,8 @@ export interface SalePromotion {
|
|
|
30
31
|
oncePerCustomer: boolean;
|
|
31
32
|
/** Si se puede sumar con otras promos en la misma línea. */
|
|
32
33
|
stackable: boolean;
|
|
34
|
+
/** Solo en promos `REFERRAL`. */
|
|
35
|
+
referral?: ReferralPromotionConfig | null;
|
|
33
36
|
status: SalePromotionStatusEnum;
|
|
34
37
|
/** Derivada; `null` cuando el estado no es `ACTIVE`. */
|
|
35
38
|
phase: SalePromotionPhaseEnum | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SalePaymentMethodEnum } from '../../../retailWizard/enums/SalePaymentMethodEnum';
|
|
2
|
+
/** Body de `POST /private/sessions/{sessionId}/sale-promotion/payment-check` (M2M). */
|
|
3
|
+
export declare class CheckSalePromotionPaymentRequest {
|
|
4
|
+
/** Medio del cobro de contado; ausente = se valida contra la forma de pago de la sesión (enganche o cierre a crédito). */
|
|
5
|
+
method?: SalePaymentMethodEnum;
|
|
6
|
+
}
|
|
@@ -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.CheckSalePromotionPaymentRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SalePaymentMethodEnum_1 = require("../../../retailWizard/enums/SalePaymentMethodEnum");
|
|
16
|
+
/** Body de `POST /private/sessions/{sessionId}/sale-promotion/payment-check` (M2M). */
|
|
17
|
+
class CheckSalePromotionPaymentRequest {
|
|
18
|
+
}
|
|
19
|
+
exports.CheckSalePromotionPaymentRequest = CheckSalePromotionPaymentRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, class_validator_1.IsEnum)(SalePaymentMethodEnum_1.SalePaymentMethodEnum),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], CheckSalePromotionPaymentRequest.prototype, "method", void 0);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PromotionAppliesToEnum } from '../../enums/PromotionAppliesToEnum';
|
|
2
2
|
import { PromotionPaymentOptionEnum } from '../../enums/PromotionPaymentOptionEnum';
|
|
3
|
+
import { ReferralPromotionInput } from './ReferralPromotionInput';
|
|
3
4
|
import { SalePromotionLeversInput } from './SalePromotionLeversInput';
|
|
4
5
|
import { SalePromotionScopeInput, SalePromotionSegmentationInput } from './SalePromotionScopeInput';
|
|
5
6
|
/** Body de publicCreateSalePromotion. Nace en `DRAFT`; el retailer sale del token. */
|
|
@@ -21,4 +22,6 @@ export declare class CreateSalePromotionRequest {
|
|
|
21
22
|
oncePerCustomer?: boolean;
|
|
22
23
|
/** Si se puede sumar con otras promos en la misma línea. */
|
|
23
24
|
stackable?: boolean;
|
|
25
|
+
/** Evento, condiciones y premios de la promo de referido; ausente en las demás promos. */
|
|
26
|
+
referral?: ReferralPromotionInput | null;
|
|
24
27
|
}
|
|
@@ -14,6 +14,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const PromotionAppliesToEnum_1 = require("../../enums/PromotionAppliesToEnum");
|
|
16
16
|
const PromotionPaymentOptionEnum_1 = require("../../enums/PromotionPaymentOptionEnum");
|
|
17
|
+
const ReferralPromotionInput_1 = require("./ReferralPromotionInput");
|
|
17
18
|
const SalePromotionLeversInput_1 = require("./SalePromotionLeversInput");
|
|
18
19
|
const SalePromotionScopeInput_1 = require("./SalePromotionScopeInput");
|
|
19
20
|
/** Body de publicCreateSalePromotion. Nace en `DRAFT`; el retailer sale del token. */
|
|
@@ -95,3 +96,10 @@ __decorate([
|
|
|
95
96
|
(0, class_validator_1.IsBoolean)(),
|
|
96
97
|
__metadata("design:type", Boolean)
|
|
97
98
|
], CreateSalePromotionRequest.prototype, "stackable", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_transformer_1.Expose)(),
|
|
101
|
+
(0, class_validator_1.IsOptional)(),
|
|
102
|
+
(0, class_validator_1.ValidateNested)(),
|
|
103
|
+
(0, class_transformer_1.Type)(() => ReferralPromotionInput_1.ReferralPromotionInput),
|
|
104
|
+
__metadata("design:type", ReferralPromotionInput_1.ReferralPromotionInput)
|
|
105
|
+
], CreateSalePromotionRequest.prototype, "referral", void 0);
|
|
@@ -29,3 +29,10 @@ __decorate([
|
|
|
29
29
|
(0, class_validator_1.IsNotEmpty)(),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
31
|
], EvaluateSalePromotionsRequest.prototype, "discountCode", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], EvaluateSalePromotionsRequest.prototype, "phone", void 0);
|
|
@@ -0,0 +1,34 @@
|
|
|
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.GetReferralRewardsByPhonesRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const REWARD_PHONES_MAX_BATCH = 100;
|
|
16
|
+
/** Body de la ruta privada de premios de referido por cadena y lote de teléfonos (normalizados a 10 dígitos). */
|
|
17
|
+
class GetReferralRewardsByPhonesRequest {
|
|
18
|
+
}
|
|
19
|
+
exports.GetReferralRewardsByPhonesRequest = GetReferralRewardsByPhonesRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], GetReferralRewardsByPhonesRequest.prototype, "retailerId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
(0, class_validator_1.IsArray)(),
|
|
29
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
30
|
+
(0, class_validator_1.ArrayMaxSize)(REWARD_PHONES_MAX_BATCH),
|
|
31
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
32
|
+
(0, class_validator_1.IsNotEmpty)({ each: true }),
|
|
33
|
+
__metadata("design:type", Array)
|
|
34
|
+
], GetReferralRewardsByPhonesRequest.prototype, "phones", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReferralPromotionChannelEnum } from '../../enums/ReferralPromotionChannelEnum';
|
|
2
|
+
import { ReferralTriggerEnum } from '../../enums/ReferralTriggerEnum';
|
|
3
|
+
/** Query de las promos de referido vigentes del paso Referidos; la tienda sale de la sesión. */
|
|
4
|
+
export declare class ListLiveReferralPromotionsQuery {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
/** Sin canal: venta y crédito. */
|
|
7
|
+
channel?: ReferralPromotionChannelEnum;
|
|
8
|
+
/** `ACCOUNT_OPENED` en una apertura sin venta: solo las que se ganan al abrir cuenta. */
|
|
9
|
+
trigger?: ReferralTriggerEnum;
|
|
10
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.ListLiveReferralPromotionsQuery = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const ReferralPromotionChannelEnum_1 = require("../../enums/ReferralPromotionChannelEnum");
|
|
16
|
+
const ReferralTriggerEnum_1 = require("../../enums/ReferralTriggerEnum");
|
|
17
|
+
/** Query de las promos de referido vigentes del paso Referidos; la tienda sale de la sesión. */
|
|
18
|
+
class ListLiveReferralPromotionsQuery {
|
|
19
|
+
}
|
|
20
|
+
exports.ListLiveReferralPromotionsQuery = ListLiveReferralPromotionsQuery;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ListLiveReferralPromotionsQuery.prototype, "sessionId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, class_validator_1.IsEnum)(ReferralPromotionChannelEnum_1.ReferralPromotionChannelEnum),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], ListLiveReferralPromotionsQuery.prototype, "channel", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, class_validator_1.IsEnum)(ReferralTriggerEnum_1.ReferralTriggerEnum),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], ListLiveReferralPromotionsQuery.prototype, "trigger", void 0);
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { ReferralPromotionChannelEnum } from '../../enums/ReferralPromotionChannelEnum';
|
|
2
|
+
import { SalePromotionKindEnum } from '../../enums/SalePromotionKindEnum';
|
|
1
3
|
import { SalePromotionStatusEnum } from '../../enums/SalePromotionStatusEnum';
|
|
2
|
-
/** Query de publicListSalePromotions; sin `status` excluye las archivadas. */
|
|
4
|
+
/** Query de publicListSalePromotions; sin `status` excluye las archivadas y sin `kind` las de referido. */
|
|
3
5
|
export declare class ListSalePromotionsQuery {
|
|
4
6
|
status?: SalePromotionStatusEnum;
|
|
7
|
+
kind?: SalePromotionKindEnum;
|
|
8
|
+
/** Canal de las promos de referido. */
|
|
9
|
+
channel?: ReferralPromotionChannelEnum;
|
|
5
10
|
limit?: number;
|
|
6
11
|
nextToken?: string;
|
|
7
12
|
}
|
|
@@ -12,8 +12,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ListSalePromotionsQuery = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const ReferralPromotionChannelEnum_1 = require("../../enums/ReferralPromotionChannelEnum");
|
|
16
|
+
const SalePromotionKindEnum_1 = require("../../enums/SalePromotionKindEnum");
|
|
15
17
|
const SalePromotionStatusEnum_1 = require("../../enums/SalePromotionStatusEnum");
|
|
16
|
-
/** Query de publicListSalePromotions; sin `status` excluye las archivadas. */
|
|
18
|
+
/** Query de publicListSalePromotions; sin `status` excluye las archivadas y sin `kind` las de referido. */
|
|
17
19
|
class ListSalePromotionsQuery {
|
|
18
20
|
}
|
|
19
21
|
exports.ListSalePromotionsQuery = ListSalePromotionsQuery;
|
|
@@ -23,6 +25,18 @@ __decorate([
|
|
|
23
25
|
(0, class_validator_1.IsEnum)(SalePromotionStatusEnum_1.SalePromotionStatusEnum),
|
|
24
26
|
__metadata("design:type", String)
|
|
25
27
|
], ListSalePromotionsQuery.prototype, "status", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsEnum)(SalePromotionKindEnum_1.SalePromotionKindEnum),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ListSalePromotionsQuery.prototype, "kind", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_transformer_1.Expose)(),
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsEnum)(ReferralPromotionChannelEnum_1.ReferralPromotionChannelEnum),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], ListSalePromotionsQuery.prototype, "channel", void 0);
|
|
26
40
|
__decorate([
|
|
27
41
|
(0, class_transformer_1.Expose)(),
|
|
28
42
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReferralPromotionChannelEnum } from '../../enums/ReferralPromotionChannelEnum';
|
|
2
|
+
import { ReferralRewardTypeEnum } from '../../enums/ReferralRewardTypeEnum';
|
|
3
|
+
import { ReferralTriggerEnum } from '../../enums/ReferralTriggerEnum';
|
|
4
|
+
import { CouponLeverInput } from './SalePromotionLeversInput';
|
|
5
|
+
/** Premio de un rol en el body: exige el campo de su `type`. Qué premio vale con qué evento lo valida el lambda (422). */
|
|
6
|
+
export declare class ReferralRewardInput {
|
|
7
|
+
type: ReferralRewardTypeEnum;
|
|
8
|
+
amountCents?: number | null;
|
|
9
|
+
percentBps?: number | null;
|
|
10
|
+
maxAmountCents?: number | null;
|
|
11
|
+
coupon?: CouponLeverInput | null;
|
|
12
|
+
}
|
|
13
|
+
/** Bloque `referral` del body de la promo; su presencia la vuelve `REFERRAL`. Compra N y racha ≥ 2 los valida el lambda. */
|
|
14
|
+
export declare class ReferralPromotionInput {
|
|
15
|
+
channel: ReferralPromotionChannelEnum;
|
|
16
|
+
trigger: ReferralTriggerEnum;
|
|
17
|
+
purchaseNumber?: number | null;
|
|
18
|
+
installmentStreak?: number | null;
|
|
19
|
+
minAmountCents?: number | null;
|
|
20
|
+
windowDays?: number | null;
|
|
21
|
+
maxRewardsPerReferrer?: number | null;
|
|
22
|
+
referrerReward: ReferralRewardInput;
|
|
23
|
+
referredReward?: ReferralRewardInput | null;
|
|
24
|
+
}
|