@fiado/type-kit 3.549.0 → 3.551.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/loanCredit/cancelLoanCreditRequest.test.ts +5 -0
- package/_test_/unit/retailCommission/commissionPayments.test.ts +168 -0
- package/_test_/unit/retailCommission/commissionRules.test.ts +53 -0
- package/_test_/unit/retailOrg/dtos/RetailUser.test.ts +47 -0
- package/_test_/unit/retailOrg/dtos/requests/retailUserWalletRequests.test.ts +41 -0
- package/_test_/unit/retailOrg/dtos/responses/retailUserWalletResponses.test.ts +30 -0
- package/_test_/unit/retailOrg/enums/RetailUserWalletLinkMethodEnum.test.ts +12 -0
- package/_test_/unit/retailWizard/saleCancellation.test.ts +3 -1
- package/bin/loanCredit/dtos/requests/CancelLoanCreditRequest.d.ts +2 -0
- package/bin/loanCredit/dtos/requests/CancelLoanCreditRequest.js +9 -0
- package/bin/retailCommission/dtos/CommissionApi.d.ts +80 -1
- package/bin/retailCommission/dtos/CommissionLedger.d.ts +96 -0
- package/bin/retailCommission/dtos/CommissionLedger.js +2 -0
- package/bin/retailCommission/dtos/CommissionRule.d.ts +14 -1
- package/bin/retailCommission/enums/CommissionBillingPeriodEnum.d.ts +10 -0
- package/bin/retailCommission/enums/CommissionBillingPeriodEnum.js +14 -0
- package/bin/retailCommission/enums/CommissionLedgerMovementKindEnum.d.ts +14 -0
- package/bin/retailCommission/enums/CommissionLedgerMovementKindEnum.js +18 -0
- package/bin/retailCommission/enums/CommissionPayTimingEnum.d.ts +13 -0
- package/bin/retailCommission/enums/CommissionPayTimingEnum.js +17 -0
- package/bin/retailCommission/enums/CommissionPayTriggerEnum.d.ts +18 -0
- package/bin/retailCommission/enums/CommissionPayTriggerEnum.js +22 -0
- package/bin/retailCommission/enums/CommissionPaymentAttentionEnum.d.ts +14 -0
- package/bin/retailCommission/enums/CommissionPaymentAttentionEnum.js +18 -0
- package/bin/retailCommission/enums/CommissionPaymentStatusEnum.d.ts +14 -0
- package/bin/retailCommission/enums/CommissionPaymentStatusEnum.js +18 -0
- package/bin/retailCommission/index.d.ts +7 -0
- package/bin/retailCommission/index.js +7 -0
- package/bin/retailOrg/dtos/RetailUser.d.ts +13 -0
- package/bin/retailOrg/dtos/RetailUser.js +39 -0
- package/bin/retailOrg/dtos/requests/LinkRetailUserWalletRequest.d.ts +10 -0
- package/bin/retailOrg/dtos/requests/LinkRetailUserWalletRequest.js +37 -0
- package/bin/retailOrg/dtos/requests/LookupRetailUserWalletRequest.d.ts +10 -0
- package/bin/retailOrg/dtos/requests/LookupRetailUserWalletRequest.js +37 -0
- package/bin/retailOrg/dtos/responses/LookupRetailUserWalletResponse.d.ts +10 -0
- package/bin/retailOrg/dtos/responses/LookupRetailUserWalletResponse.js +2 -0
- package/bin/retailOrg/dtos/responses/PrivateRetailUserWalletResponse.d.ts +8 -0
- package/bin/retailOrg/dtos/responses/PrivateRetailUserWalletResponse.js +2 -0
- package/bin/retailOrg/enums/RetailUserWalletLinkMethodEnum.d.ts +11 -0
- package/bin/retailOrg/enums/RetailUserWalletLinkMethodEnum.js +15 -0
- package/bin/retailOrg/index.d.ts +6 -0
- package/bin/retailOrg/index.js +7 -0
- package/bin/retailOrg/validators/IsSingleWalletKeyConstraint.d.ts +6 -0
- package/bin/retailOrg/validators/IsSingleWalletKeyConstraint.js +24 -0
- package/bin/retailWizard/dtos/SaleCancellation.d.ts +2 -0
- package/package.json +1 -1
- package/src/loanCredit/dtos/requests/CancelLoanCreditRequest.ts +10 -1
- package/src/retailCommission/dtos/CommissionApi.ts +97 -1
- package/src/retailCommission/dtos/CommissionLedger.ts +101 -0
- package/src/retailCommission/dtos/CommissionRule.ts +15 -1
- package/src/retailCommission/enums/CommissionBillingPeriodEnum.ts +10 -0
- package/src/retailCommission/enums/CommissionLedgerMovementKindEnum.ts +14 -0
- package/src/retailCommission/enums/CommissionPayTimingEnum.ts +13 -0
- package/src/retailCommission/enums/CommissionPayTriggerEnum.ts +18 -0
- package/src/retailCommission/enums/CommissionPaymentAttentionEnum.ts +14 -0
- package/src/retailCommission/enums/CommissionPaymentStatusEnum.ts +14 -0
- package/src/retailCommission/index.ts +7 -0
- package/src/retailOrg/dtos/RetailUser.ts +39 -0
- package/src/retailOrg/dtos/requests/LinkRetailUserWalletRequest.ts +24 -0
- package/src/retailOrg/dtos/requests/LookupRetailUserWalletRequest.ts +24 -0
- package/src/retailOrg/dtos/responses/LookupRetailUserWalletResponse.ts +11 -0
- package/src/retailOrg/dtos/responses/PrivateRetailUserWalletResponse.ts +8 -0
- package/src/retailOrg/enums/RetailUserWalletLinkMethodEnum.ts +11 -0
- package/src/retailOrg/index.ts +8 -0
- package/src/retailOrg/validators/IsSingleWalletKeyConstraint.ts +18 -0
- package/src/retailWizard/dtos/SaleCancellation.ts +2 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { ProductCategoryEnum } from '../../retailCatalog/enums/ProductCategoryEnum';
|
|
2
2
|
import type { ProductTierEnum } from '../../retailCatalog/enums/ProductTierEnum';
|
|
3
|
+
import type { CommissionBillingPeriodEnum } from '../enums/CommissionBillingPeriodEnum';
|
|
3
4
|
import type { CommissionBonusModeEnum } from '../enums/CommissionBonusModeEnum';
|
|
4
5
|
import type { CommissionCountByEnum } from '../enums/CommissionCountByEnum';
|
|
5
6
|
import type { CommissionMetricEnum } from '../enums/CommissionMetricEnum';
|
|
6
7
|
import type { CommissionOperatorEnum } from '../enums/CommissionOperatorEnum';
|
|
8
|
+
import type { CommissionPayTimingEnum } from '../enums/CommissionPayTimingEnum';
|
|
7
9
|
import type { CommissionRuleStatusEnum } from '../enums/CommissionRuleStatusEnum';
|
|
8
10
|
import type { CommissionWindowEnum } from '../enums/CommissionWindowEnum';
|
|
9
11
|
/**
|
|
@@ -75,6 +77,8 @@ export interface CommissionRule {
|
|
|
75
77
|
replacesOthers: boolean;
|
|
76
78
|
/** Si la regla cuenta piezas o ventas. Ausente = `PIECE`. */
|
|
77
79
|
countBy?: CommissionCountByEnum;
|
|
80
|
+
/** Cuándo se paga lo que gana. Ausente = `ON_CUT`. */
|
|
81
|
+
payTiming?: CommissionPayTimingEnum;
|
|
78
82
|
/** Sube en cada guardado. */
|
|
79
83
|
version: number;
|
|
80
84
|
/** La versión que está en el plan vigente. `null` si nunca se publicó. */
|
|
@@ -102,10 +106,19 @@ export interface CommissionPolicyCommissions {
|
|
|
102
106
|
editedBy: string;
|
|
103
107
|
editedAt: string;
|
|
104
108
|
}
|
|
105
|
-
/**
|
|
109
|
+
/** Política de pagos a la wallet de los vendedores. */
|
|
110
|
+
export interface CommissionPayoutPolicy {
|
|
111
|
+
/** Depositar las comisiones a la wallet. Apagado, todo se calcula y queda pendiente. */
|
|
112
|
+
walletDeposits: boolean;
|
|
113
|
+
/** Cada cuánto se le cobra a la cadena. */
|
|
114
|
+
chainBillingPeriod: CommissionBillingPeriodEnum;
|
|
115
|
+
}
|
|
116
|
+
/** Políticas de la cadena. `clawback` y `commissions` son `null` mientras la cadena no las guarda. */
|
|
106
117
|
export interface CommissionPolicies {
|
|
107
118
|
clawback: CommissionPolicyClawback | null;
|
|
108
119
|
commissions: CommissionPolicyCommissions | null;
|
|
120
|
+
/** Ausente = depósitos encendidos y cobro semanal. */
|
|
121
|
+
payouts?: CommissionPayoutPolicy;
|
|
109
122
|
}
|
|
110
123
|
/**
|
|
111
124
|
* El plan vigente: las reglas publicadas y las políticas, congeladas en un snapshot inmutable.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cada cuánto se le cobra a la cadena lo que Fiado depositó a sus vendedores.
|
|
3
|
+
*
|
|
4
|
+
* WEEKLY - Semanal. Es el valor cuando la cadena no guardó la política.
|
|
5
|
+
* MONTHLY - Mensual.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum CommissionBillingPeriodEnum {
|
|
8
|
+
WEEKLY = "WEEKLY",
|
|
9
|
+
MONTHLY = "MONTHLY"
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommissionBillingPeriodEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Cada cuánto se le cobra a la cadena lo que Fiado depositó a sus vendedores.
|
|
6
|
+
*
|
|
7
|
+
* WEEKLY - Semanal. Es el valor cuando la cadena no guardó la política.
|
|
8
|
+
* MONTHLY - Mensual.
|
|
9
|
+
*/
|
|
10
|
+
var CommissionBillingPeriodEnum;
|
|
11
|
+
(function (CommissionBillingPeriodEnum) {
|
|
12
|
+
CommissionBillingPeriodEnum["WEEKLY"] = "WEEKLY";
|
|
13
|
+
CommissionBillingPeriodEnum["MONTHLY"] = "MONTHLY";
|
|
14
|
+
})(CommissionBillingPeriodEnum || (exports.CommissionBillingPeriodEnum = CommissionBillingPeriodEnum = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tipo de movimiento del libro de pagos. Un movimiento nunca cambia.
|
|
3
|
+
*
|
|
4
|
+
* EARN - Ganado: suma al exigible o al retenido.
|
|
5
|
+
* DEDUCT - Descontado del exigible.
|
|
6
|
+
* RELEASE - Liberación mensual: pasa de retenido a exigible.
|
|
7
|
+
* PAID_OUTSIDE - Pagado por fuera de la wallet: sale del exigible sin depósito.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum CommissionLedgerMovementKindEnum {
|
|
10
|
+
EARN = "EARN",
|
|
11
|
+
DEDUCT = "DEDUCT",
|
|
12
|
+
RELEASE = "RELEASE",
|
|
13
|
+
PAID_OUTSIDE = "PAID_OUTSIDE"
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommissionLedgerMovementKindEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Tipo de movimiento del libro de pagos. Un movimiento nunca cambia.
|
|
6
|
+
*
|
|
7
|
+
* EARN - Ganado: suma al exigible o al retenido.
|
|
8
|
+
* DEDUCT - Descontado del exigible.
|
|
9
|
+
* RELEASE - Liberación mensual: pasa de retenido a exigible.
|
|
10
|
+
* PAID_OUTSIDE - Pagado por fuera de la wallet: sale del exigible sin depósito.
|
|
11
|
+
*/
|
|
12
|
+
var CommissionLedgerMovementKindEnum;
|
|
13
|
+
(function (CommissionLedgerMovementKindEnum) {
|
|
14
|
+
CommissionLedgerMovementKindEnum["EARN"] = "EARN";
|
|
15
|
+
CommissionLedgerMovementKindEnum["DEDUCT"] = "DEDUCT";
|
|
16
|
+
CommissionLedgerMovementKindEnum["RELEASE"] = "RELEASE";
|
|
17
|
+
CommissionLedgerMovementKindEnum["PAID_OUTSIDE"] = "PAID_OUTSIDE";
|
|
18
|
+
})(CommissionLedgerMovementKindEnum || (exports.CommissionLedgerMovementKindEnum = CommissionLedgerMovementKindEnum = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cuándo se paga lo que gana una regla.
|
|
3
|
+
*
|
|
4
|
+
* ON_SALE - Al momento: se vuelve exigible al registrar la venta. Solo para reglas que únicamente
|
|
5
|
+
* pagan bono por venta.
|
|
6
|
+
* ON_CUT - Al cierre de la semana. Es el valor cuando la regla no lo trae.
|
|
7
|
+
* MONTHLY - Al cierre del mes: se retiene hasta el día 1 del mes siguiente al lunes del corte.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum CommissionPayTimingEnum {
|
|
10
|
+
ON_SALE = "ON_SALE",
|
|
11
|
+
ON_CUT = "ON_CUT",
|
|
12
|
+
MONTHLY = "MONTHLY"
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommissionPayTimingEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Cuándo se paga lo que gana una regla.
|
|
6
|
+
*
|
|
7
|
+
* ON_SALE - Al momento: se vuelve exigible al registrar la venta. Solo para reglas que únicamente
|
|
8
|
+
* pagan bono por venta.
|
|
9
|
+
* ON_CUT - Al cierre de la semana. Es el valor cuando la regla no lo trae.
|
|
10
|
+
* MONTHLY - Al cierre del mes: se retiene hasta el día 1 del mes siguiente al lunes del corte.
|
|
11
|
+
*/
|
|
12
|
+
var CommissionPayTimingEnum;
|
|
13
|
+
(function (CommissionPayTimingEnum) {
|
|
14
|
+
CommissionPayTimingEnum["ON_SALE"] = "ON_SALE";
|
|
15
|
+
CommissionPayTimingEnum["ON_CUT"] = "ON_CUT";
|
|
16
|
+
CommissionPayTimingEnum["MONTHLY"] = "MONTHLY";
|
|
17
|
+
})(CommissionPayTimingEnum || (exports.CommissionPayTimingEnum = CommissionPayTimingEnum = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Qué pidió pagarle a un vendedor.
|
|
3
|
+
*
|
|
4
|
+
* SALE - Una venta con reglas al momento.
|
|
5
|
+
* CUT - El cierre del corte.
|
|
6
|
+
* RELEASE - La liberación mensual.
|
|
7
|
+
* ADJUSTMENT - Un ajuste manual.
|
|
8
|
+
* WALLET_LINKED - Se vinculó su wallet.
|
|
9
|
+
* RETRY - "Reintentar ahora" desde "Por pagar".
|
|
10
|
+
*/
|
|
11
|
+
export declare enum CommissionPayTriggerEnum {
|
|
12
|
+
SALE = "SALE",
|
|
13
|
+
CUT = "CUT",
|
|
14
|
+
RELEASE = "RELEASE",
|
|
15
|
+
ADJUSTMENT = "ADJUSTMENT",
|
|
16
|
+
WALLET_LINKED = "WALLET_LINKED",
|
|
17
|
+
RETRY = "RETRY"
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommissionPayTriggerEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Qué pidió pagarle a un vendedor.
|
|
6
|
+
*
|
|
7
|
+
* SALE - Una venta con reglas al momento.
|
|
8
|
+
* CUT - El cierre del corte.
|
|
9
|
+
* RELEASE - La liberación mensual.
|
|
10
|
+
* ADJUSTMENT - Un ajuste manual.
|
|
11
|
+
* WALLET_LINKED - Se vinculó su wallet.
|
|
12
|
+
* RETRY - "Reintentar ahora" desde "Por pagar".
|
|
13
|
+
*/
|
|
14
|
+
var CommissionPayTriggerEnum;
|
|
15
|
+
(function (CommissionPayTriggerEnum) {
|
|
16
|
+
CommissionPayTriggerEnum["SALE"] = "SALE";
|
|
17
|
+
CommissionPayTriggerEnum["CUT"] = "CUT";
|
|
18
|
+
CommissionPayTriggerEnum["RELEASE"] = "RELEASE";
|
|
19
|
+
CommissionPayTriggerEnum["ADJUSTMENT"] = "ADJUSTMENT";
|
|
20
|
+
CommissionPayTriggerEnum["WALLET_LINKED"] = "WALLET_LINKED";
|
|
21
|
+
CommissionPayTriggerEnum["RETRY"] = "RETRY";
|
|
22
|
+
})(CommissionPayTriggerEnum || (exports.CommissionPayTriggerEnum = CommissionPayTriggerEnum = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Por qué el saldo de un vendedor aparece en "Por pagar".
|
|
3
|
+
*
|
|
4
|
+
* NO_WALLET - No tiene wallet vinculada.
|
|
5
|
+
* REJECTED - Su último depósito se rechazó (cuenta bloqueada, tope de nivel...); el código va aparte.
|
|
6
|
+
* PAUSED - La cadena apagó los depósitos a la wallet.
|
|
7
|
+
* DEBT - Su exigible es negativo: debe.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum CommissionPaymentAttentionEnum {
|
|
10
|
+
NO_WALLET = "NO_WALLET",
|
|
11
|
+
REJECTED = "REJECTED",
|
|
12
|
+
PAUSED = "PAUSED",
|
|
13
|
+
DEBT = "DEBT"
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommissionPaymentAttentionEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Por qué el saldo de un vendedor aparece en "Por pagar".
|
|
6
|
+
*
|
|
7
|
+
* NO_WALLET - No tiene wallet vinculada.
|
|
8
|
+
* REJECTED - Su último depósito se rechazó (cuenta bloqueada, tope de nivel...); el código va aparte.
|
|
9
|
+
* PAUSED - La cadena apagó los depósitos a la wallet.
|
|
10
|
+
* DEBT - Su exigible es negativo: debe.
|
|
11
|
+
*/
|
|
12
|
+
var CommissionPaymentAttentionEnum;
|
|
13
|
+
(function (CommissionPaymentAttentionEnum) {
|
|
14
|
+
CommissionPaymentAttentionEnum["NO_WALLET"] = "NO_WALLET";
|
|
15
|
+
CommissionPaymentAttentionEnum["REJECTED"] = "REJECTED";
|
|
16
|
+
CommissionPaymentAttentionEnum["PAUSED"] = "PAUSED";
|
|
17
|
+
CommissionPaymentAttentionEnum["DEBT"] = "DEBT";
|
|
18
|
+
})(CommissionPaymentAttentionEnum || (exports.CommissionPaymentAttentionEnum = CommissionPaymentAttentionEnum = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado de un depósito de comisiones a la wallet del vendedor.
|
|
3
|
+
*
|
|
4
|
+
* PENDING - El monto se apartó y el depósito está en curso.
|
|
5
|
+
* ACCREDITED - Depositado, con folio.
|
|
6
|
+
* FAILED - Rechazado sin mover dinero: el monto vuelve al exigible.
|
|
7
|
+
* UNVERIFIED - Resultado ambiguo: el monto sigue apartado y no se reintenta solo; alguien lo revisa.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum CommissionPaymentStatusEnum {
|
|
10
|
+
PENDING = "PENDING",
|
|
11
|
+
ACCREDITED = "ACCREDITED",
|
|
12
|
+
FAILED = "FAILED",
|
|
13
|
+
UNVERIFIED = "UNVERIFIED"
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommissionPaymentStatusEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Estado de un depósito de comisiones a la wallet del vendedor.
|
|
6
|
+
*
|
|
7
|
+
* PENDING - El monto se apartó y el depósito está en curso.
|
|
8
|
+
* ACCREDITED - Depositado, con folio.
|
|
9
|
+
* FAILED - Rechazado sin mover dinero: el monto vuelve al exigible.
|
|
10
|
+
* UNVERIFIED - Resultado ambiguo: el monto sigue apartado y no se reintenta solo; alguien lo revisa.
|
|
11
|
+
*/
|
|
12
|
+
var CommissionPaymentStatusEnum;
|
|
13
|
+
(function (CommissionPaymentStatusEnum) {
|
|
14
|
+
CommissionPaymentStatusEnum["PENDING"] = "PENDING";
|
|
15
|
+
CommissionPaymentStatusEnum["ACCREDITED"] = "ACCREDITED";
|
|
16
|
+
CommissionPaymentStatusEnum["FAILED"] = "FAILED";
|
|
17
|
+
CommissionPaymentStatusEnum["UNVERIFIED"] = "UNVERIFIED";
|
|
18
|
+
})(CommissionPaymentStatusEnum || (exports.CommissionPaymentStatusEnum = CommissionPaymentStatusEnum = {}));
|
|
@@ -20,11 +20,18 @@ export * from './enums/CommissionCountByEnum';
|
|
|
20
20
|
export * from './enums/CommissionAggregateByEnum';
|
|
21
21
|
export * from './enums/CommissionSeriesByEnum';
|
|
22
22
|
export * from './enums/CommissionSimulationSkipEnum';
|
|
23
|
+
export * from './enums/CommissionPayTimingEnum';
|
|
24
|
+
export * from './enums/CommissionBillingPeriodEnum';
|
|
25
|
+
export * from './enums/CommissionPaymentStatusEnum';
|
|
26
|
+
export * from './enums/CommissionPaymentAttentionEnum';
|
|
27
|
+
export * from './enums/CommissionLedgerMovementKindEnum';
|
|
28
|
+
export * from './enums/CommissionPayTriggerEnum';
|
|
23
29
|
export * from './dtos/CommissionPlan';
|
|
24
30
|
export * from './dtos/CommissionRule';
|
|
25
31
|
export * from './dtos/CommissionCouponAccrual';
|
|
26
32
|
export * from './dtos/CommissionCalcTrace';
|
|
27
33
|
export * from './dtos/CommissionAccrual';
|
|
28
34
|
export * from './dtos/CommissionPayout';
|
|
35
|
+
export * from './dtos/CommissionLedger';
|
|
29
36
|
export * from './dtos/CommissionApi';
|
|
30
37
|
export * from './dtos/PrivateLatestClosedPayout';
|
|
@@ -37,6 +37,12 @@ __exportStar(require("./enums/CommissionCountByEnum"), exports);
|
|
|
37
37
|
__exportStar(require("./enums/CommissionAggregateByEnum"), exports);
|
|
38
38
|
__exportStar(require("./enums/CommissionSeriesByEnum"), exports);
|
|
39
39
|
__exportStar(require("./enums/CommissionSimulationSkipEnum"), exports);
|
|
40
|
+
__exportStar(require("./enums/CommissionPayTimingEnum"), exports);
|
|
41
|
+
__exportStar(require("./enums/CommissionBillingPeriodEnum"), exports);
|
|
42
|
+
__exportStar(require("./enums/CommissionPaymentStatusEnum"), exports);
|
|
43
|
+
__exportStar(require("./enums/CommissionPaymentAttentionEnum"), exports);
|
|
44
|
+
__exportStar(require("./enums/CommissionLedgerMovementKindEnum"), exports);
|
|
45
|
+
__exportStar(require("./enums/CommissionPayTriggerEnum"), exports);
|
|
40
46
|
// Entidades del dominio
|
|
41
47
|
__exportStar(require("./dtos/CommissionPlan"), exports);
|
|
42
48
|
__exportStar(require("./dtos/CommissionRule"), exports);
|
|
@@ -44,6 +50,7 @@ __exportStar(require("./dtos/CommissionCouponAccrual"), exports);
|
|
|
44
50
|
__exportStar(require("./dtos/CommissionCalcTrace"), exports);
|
|
45
51
|
__exportStar(require("./dtos/CommissionAccrual"), exports);
|
|
46
52
|
__exportStar(require("./dtos/CommissionPayout"), exports);
|
|
53
|
+
__exportStar(require("./dtos/CommissionLedger"), exports);
|
|
47
54
|
// Contratos HTTP — uno por endpoint
|
|
48
55
|
__exportStar(require("./dtos/CommissionApi"), exports);
|
|
49
56
|
__exportStar(require("./dtos/PrivateLatestClosedPayout"), exports);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CollectorSeniorityEnum } from '../enums/CollectorSeniorityEnum';
|
|
2
2
|
import { EmploymentTypeEnum } from '../enums/EmploymentTypeEnum';
|
|
3
3
|
import { RetailUserStatusEnum } from '../enums/RetailUserStatusEnum';
|
|
4
|
+
import { RetailUserWalletLinkMethodEnum } from '../enums/RetailUserWalletLinkMethodEnum';
|
|
4
5
|
/**
|
|
5
6
|
* RetailUser — usuario retail (empleado de tienda) de un retailer (SureKeep Fase 1 — pista Retail).
|
|
6
7
|
* `cognitoSub` enlaza con la identidad en Cognito (validada vía platform-rbac por api-invoker).
|
|
@@ -28,6 +29,18 @@ export declare class RetailUser {
|
|
|
28
29
|
/** Tiendas que cubre el cobrador (zona de cobranza); opcional. */
|
|
29
30
|
coverageStoreIds?: string[];
|
|
30
31
|
status: RetailUserStatusEnum;
|
|
32
|
+
/** Directorio de Fiado del dueño de la wallet PCF; `null` o ausente si no tiene wallet. */
|
|
33
|
+
fiadoDirectoryId?: string | null;
|
|
34
|
+
/** Cuenta PCF de la wallet. */
|
|
35
|
+
pcfAccountId?: string | null;
|
|
36
|
+
/** Cómo se encontró la wallet: por CLABE o por teléfono. */
|
|
37
|
+
walletLinkMethod?: RetailUserWalletLinkMethodEnum | null;
|
|
38
|
+
/** Últimos 4 dígitos de la CLABE; la CLABE completa no se guarda. */
|
|
39
|
+
walletClabeLast4?: string | null;
|
|
40
|
+
/** Cuándo se vinculó (ISO). */
|
|
41
|
+
walletLinkedAt?: string | null;
|
|
42
|
+
/** Quién la vinculó: el actorId del usuario del back office. */
|
|
43
|
+
walletLinkedBy?: string | null;
|
|
31
44
|
createdAt: string;
|
|
32
45
|
updatedAt: string;
|
|
33
46
|
createdBy: string;
|
|
@@ -16,6 +16,7 @@ const regex_1 = require("../../helpers/constans/regex");
|
|
|
16
16
|
const CollectorSeniorityEnum_1 = require("../enums/CollectorSeniorityEnum");
|
|
17
17
|
const EmploymentTypeEnum_1 = require("../enums/EmploymentTypeEnum");
|
|
18
18
|
const RetailUserStatusEnum_1 = require("../enums/RetailUserStatusEnum");
|
|
19
|
+
const RetailUserWalletLinkMethodEnum_1 = require("../enums/RetailUserWalletLinkMethodEnum");
|
|
19
20
|
/**
|
|
20
21
|
* RetailUser — usuario retail (empleado de tienda) de un retailer (SureKeep Fase 1 — pista Retail).
|
|
21
22
|
* `cognitoSub` enlaza con la identidad en Cognito (validada vía platform-rbac por api-invoker).
|
|
@@ -89,6 +90,44 @@ __decorate([
|
|
|
89
90
|
(0, class_validator_1.IsEnum)(RetailUserStatusEnum_1.RetailUserStatusEnum),
|
|
90
91
|
__metadata("design:type", String)
|
|
91
92
|
], RetailUser.prototype, "status", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_transformer_1.Expose)(),
|
|
95
|
+
(0, class_validator_1.IsOptional)(),
|
|
96
|
+
(0, class_validator_1.IsString)(),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], RetailUser.prototype, "fiadoDirectoryId", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_transformer_1.Expose)(),
|
|
101
|
+
(0, class_validator_1.IsOptional)(),
|
|
102
|
+
(0, class_validator_1.IsString)(),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], RetailUser.prototype, "pcfAccountId", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, class_transformer_1.Expose)(),
|
|
107
|
+
(0, class_validator_1.IsOptional)(),
|
|
108
|
+
(0, class_validator_1.IsEnum)(RetailUserWalletLinkMethodEnum_1.RetailUserWalletLinkMethodEnum),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], RetailUser.prototype, "walletLinkMethod", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, class_transformer_1.Expose)(),
|
|
113
|
+
(0, class_validator_1.IsOptional)(),
|
|
114
|
+
(0, class_validator_1.IsString)(),
|
|
115
|
+
(0, class_validator_1.Matches)(/^\d{4}$/, { message: 'walletClabeLast4 debe tener 4 dígitos' }),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], RetailUser.prototype, "walletClabeLast4", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, class_transformer_1.Expose)(),
|
|
120
|
+
(0, class_validator_1.IsOptional)(),
|
|
121
|
+
(0, class_validator_1.IsString)(),
|
|
122
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601, { message: 'walletLinkedAt debe ser una fecha ISO 8601' }),
|
|
123
|
+
__metadata("design:type", String)
|
|
124
|
+
], RetailUser.prototype, "walletLinkedAt", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_transformer_1.Expose)(),
|
|
127
|
+
(0, class_validator_1.IsOptional)(),
|
|
128
|
+
(0, class_validator_1.IsString)(),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], RetailUser.prototype, "walletLinkedBy", void 0);
|
|
92
131
|
__decorate([
|
|
93
132
|
(0, class_transformer_1.Expose)(),
|
|
94
133
|
(0, class_validator_1.IsString)(),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body de `PUT /retailers/{retailerId}/users/{retailUserId}/wallet`: vincula la wallet PCF del
|
|
3
|
+
* vendedor por CLABE o por teléfono, exactamente uno. El servidor vuelve a resolver la cuenta.
|
|
4
|
+
*/
|
|
5
|
+
export declare class LinkRetailUserWalletRequest {
|
|
6
|
+
/** CLABE PCF, 18 dígitos. Solo se guardan los últimos 4; no va a logs completa. */
|
|
7
|
+
clabe?: string | null;
|
|
8
|
+
/** Teléfono de México: 10 dígitos, con o sin `+52`; retail-org lo normaliza a E.164. No va a logs completo. */
|
|
9
|
+
phone?: string | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.LinkRetailUserWalletRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const IsSingleWalletKeyConstraint_1 = require("../../validators/IsSingleWalletKeyConstraint");
|
|
16
|
+
/**
|
|
17
|
+
* Body de `PUT /retailers/{retailerId}/users/{retailUserId}/wallet`: vincula la wallet PCF del
|
|
18
|
+
* vendedor por CLABE o por teléfono, exactamente uno. El servidor vuelve a resolver la cuenta.
|
|
19
|
+
*/
|
|
20
|
+
class LinkRetailUserWalletRequest {
|
|
21
|
+
}
|
|
22
|
+
exports.LinkRetailUserWalletRequest = LinkRetailUserWalletRequest;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
(0, class_validator_1.ValidateIf)((o) => o.clabe != null || o.phone == null),
|
|
26
|
+
(0, class_validator_1.Validate)(IsSingleWalletKeyConstraint_1.IsSingleWalletKeyConstraint),
|
|
27
|
+
(0, class_validator_1.IsString)({ message: 'clabe debe ser texto' }),
|
|
28
|
+
(0, class_validator_1.Matches)(/^\d{18}$/, { message: 'clabe debe tener 18 dígitos' }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], LinkRetailUserWalletRequest.prototype, "clabe", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsString)({ message: 'phone debe ser texto' }),
|
|
35
|
+
(0, class_validator_1.Matches)(/^(\+52)?\d{10}$/, { message: 'phone debe tener 10 dígitos, con o sin +52' }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], LinkRetailUserWalletRequest.prototype, "phone", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body de `POST /retailers/{retailerId}/users/wallet-lookup`: busca una wallet PCF por CLABE o por
|
|
3
|
+
* teléfono, exactamente uno. No escribe nada.
|
|
4
|
+
*/
|
|
5
|
+
export declare class LookupRetailUserWalletRequest {
|
|
6
|
+
/** CLABE PCF, 18 dígitos. No va a logs completa. */
|
|
7
|
+
clabe?: string | null;
|
|
8
|
+
/** Teléfono de México: 10 dígitos, con o sin `+52`; retail-org lo normaliza a E.164. No va a logs completo. */
|
|
9
|
+
phone?: string | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.LookupRetailUserWalletRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const IsSingleWalletKeyConstraint_1 = require("../../validators/IsSingleWalletKeyConstraint");
|
|
16
|
+
/**
|
|
17
|
+
* Body de `POST /retailers/{retailerId}/users/wallet-lookup`: busca una wallet PCF por CLABE o por
|
|
18
|
+
* teléfono, exactamente uno. No escribe nada.
|
|
19
|
+
*/
|
|
20
|
+
class LookupRetailUserWalletRequest {
|
|
21
|
+
}
|
|
22
|
+
exports.LookupRetailUserWalletRequest = LookupRetailUserWalletRequest;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
(0, class_validator_1.ValidateIf)((o) => o.clabe != null || o.phone == null),
|
|
26
|
+
(0, class_validator_1.Validate)(IsSingleWalletKeyConstraint_1.IsSingleWalletKeyConstraint),
|
|
27
|
+
(0, class_validator_1.IsString)({ message: 'clabe debe ser texto' }),
|
|
28
|
+
(0, class_validator_1.Matches)(/^\d{18}$/, { message: 'clabe debe tener 18 dígitos' }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], LookupRetailUserWalletRequest.prototype, "clabe", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsString)({ message: 'phone debe ser texto' }),
|
|
35
|
+
(0, class_validator_1.Matches)(/^(\+52)?\d{10}$/, { message: 'phone debe tener 10 dígitos, con o sin +52' }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], LookupRetailUserWalletRequest.prototype, "phone", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RetailUserWalletLinkMethodEnum } from '../../enums/RetailUserWalletLinkMethodEnum';
|
|
2
|
+
/** Respuesta de `POST /retailers/{retailerId}/users/wallet-lookup`. */
|
|
3
|
+
export interface LookupRetailUserWalletResponse {
|
|
4
|
+
found: boolean;
|
|
5
|
+
active: boolean;
|
|
6
|
+
/** Nombre del titular para que el administrador confirme; `null` si no se encontró. */
|
|
7
|
+
holderName: string | null;
|
|
8
|
+
/** Por dónde se buscó. */
|
|
9
|
+
method: RetailUserWalletLinkMethodEnum;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Respuesta de `GET /private/retailers/{retailerId}/users/{retailUserId}/wallet`: la wallet del
|
|
3
|
+
* vendedor para el motor de comisiones. Ambos `null` si no tiene wallet vinculada.
|
|
4
|
+
*/
|
|
5
|
+
export interface PrivateRetailUserWalletResponse {
|
|
6
|
+
directoryId: string | null;
|
|
7
|
+
pcfAccountId: string | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cómo se encontró la wallet PCF del vendedor.
|
|
3
|
+
* @enum {string}
|
|
4
|
+
*
|
|
5
|
+
* @property {string} CLABE - Por la CLABE PCF capturada en el alta.
|
|
6
|
+
* @property {string} PHONE - Por el teléfono de su usuario de Fiado.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum RetailUserWalletLinkMethodEnum {
|
|
9
|
+
CLABE = "CLABE",
|
|
10
|
+
PHONE = "PHONE"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetailUserWalletLinkMethodEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Cómo se encontró la wallet PCF del vendedor.
|
|
6
|
+
* @enum {string}
|
|
7
|
+
*
|
|
8
|
+
* @property {string} CLABE - Por la CLABE PCF capturada en el alta.
|
|
9
|
+
* @property {string} PHONE - Por el teléfono de su usuario de Fiado.
|
|
10
|
+
*/
|
|
11
|
+
var RetailUserWalletLinkMethodEnum;
|
|
12
|
+
(function (RetailUserWalletLinkMethodEnum) {
|
|
13
|
+
RetailUserWalletLinkMethodEnum["CLABE"] = "CLABE";
|
|
14
|
+
RetailUserWalletLinkMethodEnum["PHONE"] = "PHONE";
|
|
15
|
+
})(RetailUserWalletLinkMethodEnum || (exports.RetailUserWalletLinkMethodEnum = RetailUserWalletLinkMethodEnum = {}));
|
package/bin/retailOrg/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './enums/StoreStatusEnum';
|
|
|
5
5
|
export * from './enums/RetailUserStatusEnum';
|
|
6
6
|
export * from './enums/EmploymentTypeEnum';
|
|
7
7
|
export * from './enums/CollectorSeniorityEnum';
|
|
8
|
+
export * from './enums/RetailUserWalletLinkMethodEnum';
|
|
8
9
|
export * from './enums/GoalTargetTypeEnum';
|
|
9
10
|
export * from './dtos/GeoLocation';
|
|
10
11
|
export * from './dtos/GoalAmounts';
|
|
@@ -18,6 +19,7 @@ export * from './dtos/validation/RetailUserValidationDto';
|
|
|
18
19
|
export * from './dtos/validation/CollectorValidationDto';
|
|
19
20
|
export * from './dtos/validation/PrivateSellerListResponse';
|
|
20
21
|
export * from './dtos/PaginatedResult';
|
|
22
|
+
export * from './validators/IsSingleWalletKeyConstraint';
|
|
21
23
|
export * from './dtos/requests/RetailAddressInput';
|
|
22
24
|
export * from './dtos/requests/CreateRetailerRequest';
|
|
23
25
|
export * from './dtos/requests/UpdateRetailerRequest';
|
|
@@ -34,6 +36,8 @@ export * from './dtos/requests/ProvisionRetailUserRequest';
|
|
|
34
36
|
export * from './dtos/requests/UpdateRetailUserRequest';
|
|
35
37
|
export * from './dtos/requests/ChangeRetailUserStatusRequest';
|
|
36
38
|
export * from './dtos/requests/TransferRetailUserRequest';
|
|
39
|
+
export * from './dtos/requests/LookupRetailUserWalletRequest';
|
|
40
|
+
export * from './dtos/requests/LinkRetailUserWalletRequest';
|
|
37
41
|
export * from './dtos/requests/GoalListQuery';
|
|
38
42
|
export * from './dtos/requests/GoalUpsertRequest';
|
|
39
43
|
export * from './dtos/requests/GoalPathParams';
|
|
@@ -46,3 +50,5 @@ export * from './dtos/responses/GoalUpsertResponse';
|
|
|
46
50
|
export * from './dtos/responses/PrivateGoalListResponse';
|
|
47
51
|
export * from './dtos/responses/StoreKpiResponse';
|
|
48
52
|
export * from './dtos/responses/SellerKpiResponse';
|
|
53
|
+
export * from './dtos/responses/LookupRetailUserWalletResponse';
|
|
54
|
+
export * from './dtos/responses/PrivateRetailUserWalletResponse';
|
package/bin/retailOrg/index.js
CHANGED
|
@@ -21,6 +21,7 @@ __exportStar(require("./enums/StoreStatusEnum"), exports);
|
|
|
21
21
|
__exportStar(require("./enums/RetailUserStatusEnum"), exports);
|
|
22
22
|
__exportStar(require("./enums/EmploymentTypeEnum"), exports);
|
|
23
23
|
__exportStar(require("./enums/CollectorSeniorityEnum"), exports);
|
|
24
|
+
__exportStar(require("./enums/RetailUserWalletLinkMethodEnum"), exports);
|
|
24
25
|
// F3 — Portal Admin VentasLuga (metas de venta del periodo)
|
|
25
26
|
__exportStar(require("./enums/GoalTargetTypeEnum"), exports);
|
|
26
27
|
// Entity DTOs
|
|
@@ -38,6 +39,8 @@ __exportStar(require("./dtos/validation/CollectorValidationDto"), exports);
|
|
|
38
39
|
__exportStar(require("./dtos/validation/PrivateSellerListResponse"), exports);
|
|
39
40
|
// Paginación genérica
|
|
40
41
|
__exportStar(require("./dtos/PaginatedResult"), exports);
|
|
42
|
+
// Validadores
|
|
43
|
+
__exportStar(require("./validators/IsSingleWalletKeyConstraint"), exports);
|
|
41
44
|
// Request DTOs (input validado por endpoint)
|
|
42
45
|
__exportStar(require("./dtos/requests/RetailAddressInput"), exports);
|
|
43
46
|
__exportStar(require("./dtos/requests/CreateRetailerRequest"), exports);
|
|
@@ -55,6 +58,8 @@ __exportStar(require("./dtos/requests/ProvisionRetailUserRequest"), exports);
|
|
|
55
58
|
__exportStar(require("./dtos/requests/UpdateRetailUserRequest"), exports);
|
|
56
59
|
__exportStar(require("./dtos/requests/ChangeRetailUserStatusRequest"), exports);
|
|
57
60
|
__exportStar(require("./dtos/requests/TransferRetailUserRequest"), exports);
|
|
61
|
+
__exportStar(require("./dtos/requests/LookupRetailUserWalletRequest"), exports);
|
|
62
|
+
__exportStar(require("./dtos/requests/LinkRetailUserWalletRequest"), exports);
|
|
58
63
|
// F3 — metas y KPIs del Portal Admin VL
|
|
59
64
|
__exportStar(require("./dtos/requests/GoalListQuery"), exports);
|
|
60
65
|
__exportStar(require("./dtos/requests/GoalUpsertRequest"), exports);
|
|
@@ -69,3 +74,5 @@ __exportStar(require("./dtos/responses/GoalUpsertResponse"), exports);
|
|
|
69
74
|
__exportStar(require("./dtos/responses/PrivateGoalListResponse"), exports);
|
|
70
75
|
__exportStar(require("./dtos/responses/StoreKpiResponse"), exports);
|
|
71
76
|
__exportStar(require("./dtos/responses/SellerKpiResponse"), exports);
|
|
77
|
+
__exportStar(require("./dtos/responses/LookupRetailUserWalletResponse"), exports);
|
|
78
|
+
__exportStar(require("./dtos/responses/PrivateRetailUserWalletResponse"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ValidationArguments, type ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
+
/** Exige exactamente uno de `clabe` o `phone`. */
|
|
3
|
+
export declare class IsSingleWalletKeyConstraint 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.IsSingleWalletKeyConstraint = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
/** Exige exactamente uno de `clabe` o `phone`. */
|
|
12
|
+
let IsSingleWalletKeyConstraint = class IsSingleWalletKeyConstraint {
|
|
13
|
+
validate(_value, args) {
|
|
14
|
+
const o = args.object;
|
|
15
|
+
return (o.clabe != null) !== (o.phone != null);
|
|
16
|
+
}
|
|
17
|
+
defaultMessage() {
|
|
18
|
+
return 'debe venir clabe o phone, solo uno';
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.IsSingleWalletKeyConstraint = IsSingleWalletKeyConstraint;
|
|
22
|
+
exports.IsSingleWalletKeyConstraint = IsSingleWalletKeyConstraint = __decorate([
|
|
23
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'isSingleWalletKey', async: false })
|
|
24
|
+
], IsSingleWalletKeyConstraint);
|