@fiado/type-kit 3.316.1 → 3.317.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/welcomeBonusRequests.test.ts +153 -0
- package/bin/retailCustomer/dtos/requests/WelcomeAccreditationRequest.d.ts +27 -0
- package/bin/retailCustomer/dtos/requests/WelcomeAccreditationRequest.js +113 -0
- package/bin/retailCustomer/dtos/requests/WelcomeAccreditationResultRequest.d.ts +17 -0
- package/bin/retailCustomer/dtos/requests/WelcomeAccreditationResultRequest.js +75 -0
- package/bin/retailCustomer/dtos/responses/WelcomeAccreditationResponse.d.ts +12 -0
- package/bin/retailCustomer/dtos/responses/WelcomeBonusResponse.d.ts +43 -0
- package/bin/retailCustomer/enums/WelcomeBonusAmountSourceEnum.d.ts +12 -0
- package/bin/retailCustomer/enums/WelcomeBonusAmountSourceEnum.js +16 -0
- package/bin/retailCustomer/enums/WelcomeBonusSettlementStatusEnum.d.ts +10 -0
- package/bin/retailCustomer/enums/WelcomeBonusSettlementStatusEnum.js +14 -0
- package/bin/retailCustomer/enums/WelcomeBonusStatusEnum.d.ts +17 -0
- package/bin/retailCustomer/enums/WelcomeBonusStatusEnum.js +21 -0
- package/bin/retailCustomer/index.d.ts +7 -0
- package/bin/retailCustomer/index.js +7 -0
- package/bin/walletFunding/dtos/CreditWalletFundingRequest.d.ts +0 -14
- package/bin/walletFunding/dtos/CreditWalletFundingRequest.js +0 -6
- package/package.json +1 -1
- package/src/retailCustomer/dtos/requests/WelcomeAccreditationRequest.ts +96 -0
- package/src/retailCustomer/dtos/requests/WelcomeAccreditationResultRequest.ts +62 -0
- package/src/retailCustomer/dtos/responses/WelcomeAccreditationResponse.ts +13 -0
- package/src/retailCustomer/dtos/responses/WelcomeBonusResponse.ts +44 -0
- package/src/retailCustomer/enums/WelcomeBonusAmountSourceEnum.ts +12 -0
- package/src/retailCustomer/enums/WelcomeBonusSettlementStatusEnum.ts +10 -0
- package/src/retailCustomer/enums/WelcomeBonusStatusEnum.ts +17 -0
- package/src/retailCustomer/index.ts +7 -0
- package/src/walletFunding/dtos/CreditWalletFundingRequest.ts +0 -14
- package/bin/benefitCenter/enums/BenefitFlowEnum.d.ts +0 -11
- package/bin/benefitCenter/enums/BenefitFlowEnum.js +0 -15
- package/bin/identity/enums/SelfieSourceEnum.d.ts +0 -10
- package/bin/identity/enums/SelfieSourceEnum.js +0 -14
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.d.ts +0 -11
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.js +0 -46
- package/bin/loanCredit/enums/ClientLevelEnum.d.ts +0 -11
- package/bin/loanCredit/enums/ClientLevelEnum.js +0 -15
- package/bin/retailCards/dtos/requests/AssignCardRequest.d.ts +0 -6
- package/bin/retailCards/dtos/requests/AssignCardRequest.js +0 -30
- package/bin/retailCards/dtos/requests/CancelCardRequest.d.ts +0 -5
- package/bin/retailCards/dtos/requests/CancelCardRequest.js +0 -22
- package/bin/retailCards/dtos/responses/RetailCardResponse.d.ts +0 -12
- package/bin/retailCards/enums/CardBatchStatusEnum.d.ts +0 -17
- package/bin/retailCards/enums/CardBatchStatusEnum.js +0 -21
- package/bin/retailCards/enums/CardCancelReasonEnum.d.ts +0 -13
- package/bin/retailCards/enums/CardCancelReasonEnum.js +0 -17
- package/bin/retailCards/enums/RetailCardStatusEnum.d.ts +0 -13
- package/bin/retailCards/enums/RetailCardStatusEnum.js +0 -17
- package/bin/retailCards/events/RetailCardAssignedV1.d.ts +0 -10
- package/bin/retailCards/events/RetailCardCancelledV1.d.ts +0 -9
- package/bin/retailCards/events/RetailCardCancelledV1.js +0 -2
- package/bin/retailCards/events/RetailCardReleasedV1.d.ts +0 -7
- package/bin/retailCards/events/RetailCardReleasedV1.js +0 -2
- package/bin/retailWizard/dtos/requests/CompleteSaleRequest.d.ts +0 -9
- package/bin/retailWizard/dtos/requests/CompleteSaleRequest.js +0 -29
- package/bin/retailWizard/dtos/requests/MarkPcfCardDeliveredRequest.d.ts +0 -4
- package/bin/retailWizard/dtos/requests/MarkPcfCardDeliveredRequest.js +0 -23
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +0 -6
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +0 -31
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +0 -7
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +0 -6
- package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +0 -11
- package/bin/walletFunding/dtos/CancelFundingRequest.js +0 -33
- package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +0 -14
- package/bin/walletFunding/dtos/CancelFundingResponse.js +0 -12
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +0 -3
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +0 -21
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +0 -7
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +0 -6
- /package/bin/{retailCards/dtos/responses/RetailCardResponse.js → retailCustomer/dtos/responses/WelcomeAccreditationResponse.js} +0 -0
- /package/bin/{retailCards/events/RetailCardAssignedV1.js → retailCustomer/dtos/responses/WelcomeBonusResponse.js} +0 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { plainToInstance } from 'class-transformer';
|
|
3
|
+
import { validateSync } from 'class-validator';
|
|
4
|
+
import { WelcomeAccreditationRequest } from '../../../src/retailCustomer/dtos/requests/WelcomeAccreditationRequest';
|
|
5
|
+
import { WelcomeAccreditationResultRequest } from '../../../src/retailCustomer/dtos/requests/WelcomeAccreditationResultRequest';
|
|
6
|
+
import { WelcomeBonusStatusEnum } from '../../../src/retailCustomer/enums/WelcomeBonusStatusEnum';
|
|
7
|
+
import { WelcomeBonusAmountSourceEnum } from '../../../src/retailCustomer/enums/WelcomeBonusAmountSourceEnum';
|
|
8
|
+
import { WelcomeBonusSettlementStatusEnum } from '../../../src/retailCustomer/enums/WelcomeBonusSettlementStatusEnum';
|
|
9
|
+
|
|
10
|
+
/** Valida como lo hace `retail-customer-business`: con `@Expose` y `excludeExtraneousValues`. */
|
|
11
|
+
function errorsOf<T extends object>(cls: new () => T, payload: Record<string, unknown>): string[] {
|
|
12
|
+
const dto = plainToInstance(cls, payload, { excludeExtraneousValues: true });
|
|
13
|
+
return validateSync(dto).map((e) => e.property);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
describe('WelcomeAccreditationRequest — los datos de la venta son opcionales', () => {
|
|
17
|
+
// Durante la ventana de despliegue el wizard viejo llama sin body: el asiento nace incompleto,
|
|
18
|
+
// pero nace. Si el DTO exigiera los campos, la acreditación se caería con 400.
|
|
19
|
+
it('acepta un body vacío', () => {
|
|
20
|
+
expect(errorsOf(WelcomeAccreditationRequest, {})).toEqual([]);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('acepta el juego completo de datos de la venta', () => {
|
|
24
|
+
expect(
|
|
25
|
+
errorsOf(WelcomeAccreditationRequest, {
|
|
26
|
+
storeId: 'store-1',
|
|
27
|
+
retailerId: 'surekeep',
|
|
28
|
+
sellerRetailUserId: 'user-1',
|
|
29
|
+
saleId: 'sale-1',
|
|
30
|
+
folio: 'F-001',
|
|
31
|
+
wizardSessionId: 'sess-1',
|
|
32
|
+
amountCents: 10_000,
|
|
33
|
+
currency: 'MXN',
|
|
34
|
+
amountSource: WelcomeBonusAmountSourceEnum.PARAM,
|
|
35
|
+
idempotencyKey: 'SUREKEEP-WELCOME-c1',
|
|
36
|
+
providerName: 'surekeep-welcome-bonus',
|
|
37
|
+
}),
|
|
38
|
+
).toEqual([]);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// `storeId` es la partición del asiento: en blanco degradaría la pk a una constante.
|
|
42
|
+
it('rechaza un storeId en blanco', () => {
|
|
43
|
+
for (const storeId of ['', ' ']) {
|
|
44
|
+
expect(errorsOf(WelcomeAccreditationRequest, { storeId })).toContain('storeId');
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('recorta los espacios del storeId antes de que llegue al dominio', () => {
|
|
49
|
+
const dto = plainToInstance(
|
|
50
|
+
WelcomeAccreditationRequest,
|
|
51
|
+
{ storeId: ' store-1 ' },
|
|
52
|
+
{ excludeExtraneousValues: true },
|
|
53
|
+
);
|
|
54
|
+
expect(dto.storeId).toBe('store-1');
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('rechaza un monto de 0, negativo o fraccionario', () => {
|
|
58
|
+
for (const amountCents of [0, -1, 1.5]) {
|
|
59
|
+
expect(errorsOf(WelcomeAccreditationRequest, { amountCents })).toContain('amountCents');
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('rechaza un amountSource fuera del catálogo', () => {
|
|
64
|
+
expect(errorsOf(WelcomeAccreditationRequest, { amountSource: 'INVENTADO' })).toContain(
|
|
65
|
+
'amountSource',
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
describe('WelcomeAccreditationResultRequest — cerrar el asiento', () => {
|
|
71
|
+
it('acepta ACCREDITED con la transacción del processor', () => {
|
|
72
|
+
expect(
|
|
73
|
+
errorsOf(WelcomeAccreditationResultRequest, {
|
|
74
|
+
bonusKey: 'key-1',
|
|
75
|
+
status: WelcomeBonusStatusEnum.ACCREDITED,
|
|
76
|
+
processorTransactionId: 'tx-1',
|
|
77
|
+
}),
|
|
78
|
+
).toEqual([]);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// Sin la transacción del processor el asiento ACCREDITED no es conciliable contra nada.
|
|
82
|
+
it('exige processorTransactionId cuando el resultado es ACCREDITED', () => {
|
|
83
|
+
expect(
|
|
84
|
+
errorsOf(WelcomeAccreditationResultRequest, {
|
|
85
|
+
bonusKey: 'key-1',
|
|
86
|
+
status: WelcomeBonusStatusEnum.ACCREDITED,
|
|
87
|
+
}),
|
|
88
|
+
).toContain('processorTransactionId');
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it.each([WelcomeBonusStatusEnum.FAILED, WelcomeBonusStatusEnum.UNVERIFIED])(
|
|
92
|
+
'exige failReason cuando el resultado es %s',
|
|
93
|
+
(status) => {
|
|
94
|
+
expect(errorsOf(WelcomeAccreditationResultRequest, { bonusKey: 'key-1', status })).toContain(
|
|
95
|
+
'failReason',
|
|
96
|
+
);
|
|
97
|
+
},
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
it.each([WelcomeBonusStatusEnum.FAILED, WelcomeBonusStatusEnum.UNVERIFIED])(
|
|
101
|
+
'acepta %s con su motivo',
|
|
102
|
+
(status) => {
|
|
103
|
+
expect(
|
|
104
|
+
errorsOf(WelcomeAccreditationResultRequest, {
|
|
105
|
+
bonusKey: 'key-1',
|
|
106
|
+
status,
|
|
107
|
+
failReason: 'timeout del processor',
|
|
108
|
+
}),
|
|
109
|
+
).toEqual([]);
|
|
110
|
+
},
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
// PENDING es el estado inicial que escribe el server, no un resultado que el caller pueda mandar.
|
|
114
|
+
it('rechaza PENDING como resultado', () => {
|
|
115
|
+
expect(
|
|
116
|
+
errorsOf(WelcomeAccreditationResultRequest, {
|
|
117
|
+
bonusKey: 'key-1',
|
|
118
|
+
status: WelcomeBonusStatusEnum.PENDING,
|
|
119
|
+
}),
|
|
120
|
+
).toContain('status');
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('exige el bonusKey: sin él no se sabe qué asiento cerrar', () => {
|
|
124
|
+
for (const bonusKey of [undefined, '', ' ']) {
|
|
125
|
+
expect(
|
|
126
|
+
errorsOf(WelcomeAccreditationResultRequest, {
|
|
127
|
+
bonusKey,
|
|
128
|
+
status: WelcomeBonusStatusEnum.ACCREDITED,
|
|
129
|
+
processorTransactionId: 'tx-1',
|
|
130
|
+
}),
|
|
131
|
+
).toContain('bonusKey');
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
describe('enums del bono de bienvenida', () => {
|
|
137
|
+
it('el estado del asiento distingue el fallo inequívoco del ambiguo', () => {
|
|
138
|
+
expect(Object.values(WelcomeBonusStatusEnum)).toEqual([
|
|
139
|
+
'PENDING',
|
|
140
|
+
'ACCREDITED',
|
|
141
|
+
'FAILED',
|
|
142
|
+
'UNVERIFIED',
|
|
143
|
+
]);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
it('la conciliación arranca pendiente de remitir', () => {
|
|
147
|
+
expect(Object.values(WelcomeBonusSettlementStatusEnum)).toEqual(['PENDING', 'REMITTED']);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it('el origen del monto distingue el parámetro del fallback local', () => {
|
|
151
|
+
expect(Object.values(WelcomeBonusAmountSourceEnum)).toEqual(['PARAM', 'DEFAULT']);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { WelcomeBonusAmountSourceEnum } from '../../enums/WelcomeBonusAmountSourceEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Datos de la venta que acompañan la reserva del bono de bienvenida (D33):
|
|
4
|
+
* `POST /private/customers/:id/welcome-accreditation`. SureKeep Fase 2 — pista Retail.
|
|
5
|
+
*
|
|
6
|
+
* **TODOS los campos son opcionales a propósito.** El customer despliega antes que el wizard, así que
|
|
7
|
+
* durante la ventana el wizard viejo sigue llamando sin body: el asiento nace incompleto y se acredita
|
|
8
|
+
* igual. Exigirlos convertiría esa ventana en un 400 que deja al cliente sin bono.
|
|
9
|
+
*/
|
|
10
|
+
export declare class WelcomeAccreditationRequest {
|
|
11
|
+
/** Tienda donde se dio el bono — es la partición del asiento. */
|
|
12
|
+
storeId?: string;
|
|
13
|
+
retailerId?: string;
|
|
14
|
+
/** Vendedor que cerró la venta. */
|
|
15
|
+
sellerRetailUserId?: string;
|
|
16
|
+
saleId?: string;
|
|
17
|
+
/** Folio de la venta, tal como lo ve el vendedor en el ticket. */
|
|
18
|
+
folio?: string;
|
|
19
|
+
wizardSessionId?: string;
|
|
20
|
+
amountCents?: number;
|
|
21
|
+
/** ISO-4217. Ausente ⇒ el server asienta `MXN`. */
|
|
22
|
+
currency?: string;
|
|
23
|
+
amountSource?: WelcomeBonusAmountSourceEnum;
|
|
24
|
+
/** Clave con la que el caller acredita en el processor — ata el asiento al movimiento de plata. */
|
|
25
|
+
idempotencyKey?: string;
|
|
26
|
+
providerName?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
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.WelcomeAccreditationRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const WelcomeBonusAmountSourceEnum_1 = require("../../enums/WelcomeBonusAmountSourceEnum");
|
|
16
|
+
/** Recorta los strings del borde: un valor con espacios ensucia claves y cortes de conciliación. */
|
|
17
|
+
const trim = () => (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value));
|
|
18
|
+
/**
|
|
19
|
+
* Datos de la venta que acompañan la reserva del bono de bienvenida (D33):
|
|
20
|
+
* `POST /private/customers/:id/welcome-accreditation`. SureKeep Fase 2 — pista Retail.
|
|
21
|
+
*
|
|
22
|
+
* **TODOS los campos son opcionales a propósito.** El customer despliega antes que el wizard, así que
|
|
23
|
+
* durante la ventana el wizard viejo sigue llamando sin body: el asiento nace incompleto y se acredita
|
|
24
|
+
* igual. Exigirlos convertiría esa ventana en un 400 que deja al cliente sin bono.
|
|
25
|
+
*/
|
|
26
|
+
class WelcomeAccreditationRequest {
|
|
27
|
+
}
|
|
28
|
+
exports.WelcomeAccreditationRequest = WelcomeAccreditationRequest;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
trim(),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], WelcomeAccreditationRequest.prototype, "storeId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
trim(),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], WelcomeAccreditationRequest.prototype, "retailerId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_transformer_1.Expose)(),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
trim(),
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], WelcomeAccreditationRequest.prototype, "sellerRetailUserId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_transformer_1.Expose)(),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
trim(),
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], WelcomeAccreditationRequest.prototype, "saleId", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, class_transformer_1.Expose)(),
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
trim(),
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], WelcomeAccreditationRequest.prototype, "folio", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_transformer_1.Expose)(),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
trim(),
|
|
73
|
+
(0, class_validator_1.IsString)(),
|
|
74
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], WelcomeAccreditationRequest.prototype, "wizardSessionId", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_transformer_1.Expose)(),
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
80
|
+
(0, class_validator_1.IsInt)(),
|
|
81
|
+
(0, class_validator_1.IsPositive)(),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], WelcomeAccreditationRequest.prototype, "amountCents", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_transformer_1.Expose)(),
|
|
86
|
+
(0, class_validator_1.IsOptional)(),
|
|
87
|
+
trim(),
|
|
88
|
+
(0, class_validator_1.IsString)(),
|
|
89
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], WelcomeAccreditationRequest.prototype, "currency", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, class_transformer_1.Expose)(),
|
|
94
|
+
(0, class_validator_1.IsOptional)(),
|
|
95
|
+
(0, class_validator_1.IsEnum)(WelcomeBonusAmountSourceEnum_1.WelcomeBonusAmountSourceEnum),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], WelcomeAccreditationRequest.prototype, "amountSource", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_transformer_1.Expose)(),
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
trim(),
|
|
102
|
+
(0, class_validator_1.IsString)(),
|
|
103
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], WelcomeAccreditationRequest.prototype, "idempotencyKey", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, class_transformer_1.Expose)(),
|
|
108
|
+
(0, class_validator_1.IsOptional)(),
|
|
109
|
+
trim(),
|
|
110
|
+
(0, class_validator_1.IsString)(),
|
|
111
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], WelcomeAccreditationRequest.prototype, "providerName", void 0);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WelcomeBonusStatusEnum } from '../../enums/WelcomeBonusStatusEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Cierre del asiento del bono de bienvenida (D33):
|
|
4
|
+
* `PUT /private/customers/:id/welcome-accreditation/result`. SureKeep Fase 2 — pista Retail.
|
|
5
|
+
*
|
|
6
|
+
* `FAILED` libera el candado `welcomeAccredited` para que la venta se reintente. `UNVERIFIED` lo deja
|
|
7
|
+
* tomado: el `walletFundingCredit` del processor no deduplica, así que liberar tras un timeout podría
|
|
8
|
+
* acreditar plata real dos veces.
|
|
9
|
+
*/
|
|
10
|
+
export declare class WelcomeAccreditationResultRequest {
|
|
11
|
+
/** Referencia opaca del asiento, tal como la devolvió la reserva. */
|
|
12
|
+
bonusKey: string;
|
|
13
|
+
status: WelcomeBonusStatusEnum;
|
|
14
|
+
processorTransactionId?: string;
|
|
15
|
+
failReason?: string;
|
|
16
|
+
providerName?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.WelcomeAccreditationResultRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const WelcomeBonusStatusEnum_1 = require("../../enums/WelcomeBonusStatusEnum");
|
|
16
|
+
/** Recorta los strings del borde: un valor con espacios ensucia claves y cortes de conciliación. */
|
|
17
|
+
const trim = () => (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value));
|
|
18
|
+
/** Resultados que el caller puede asentar. `PENDING` lo escribe el server al reservar, no el caller. */
|
|
19
|
+
const RESULT_STATUSES = [
|
|
20
|
+
WelcomeBonusStatusEnum_1.WelcomeBonusStatusEnum.ACCREDITED,
|
|
21
|
+
WelcomeBonusStatusEnum_1.WelcomeBonusStatusEnum.FAILED,
|
|
22
|
+
WelcomeBonusStatusEnum_1.WelcomeBonusStatusEnum.UNVERIFIED,
|
|
23
|
+
];
|
|
24
|
+
/** Resultados que exigen un motivo legible: sin él nadie puede revisar el asiento después. */
|
|
25
|
+
const STATUSES_REQUIRING_REASON = [
|
|
26
|
+
WelcomeBonusStatusEnum_1.WelcomeBonusStatusEnum.FAILED,
|
|
27
|
+
WelcomeBonusStatusEnum_1.WelcomeBonusStatusEnum.UNVERIFIED,
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Cierre del asiento del bono de bienvenida (D33):
|
|
31
|
+
* `PUT /private/customers/:id/welcome-accreditation/result`. SureKeep Fase 2 — pista Retail.
|
|
32
|
+
*
|
|
33
|
+
* `FAILED` libera el candado `welcomeAccredited` para que la venta se reintente. `UNVERIFIED` lo deja
|
|
34
|
+
* tomado: el `walletFundingCredit` del processor no deduplica, así que liberar tras un timeout podría
|
|
35
|
+
* acreditar plata real dos veces.
|
|
36
|
+
*/
|
|
37
|
+
class WelcomeAccreditationResultRequest {
|
|
38
|
+
}
|
|
39
|
+
exports.WelcomeAccreditationResultRequest = WelcomeAccreditationResultRequest;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
trim(),
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], WelcomeAccreditationResultRequest.prototype, "bonusKey", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
(0, class_validator_1.IsIn)(RESULT_STATUSES),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], WelcomeAccreditationResultRequest.prototype, "status", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_transformer_1.Expose)(),
|
|
54
|
+
(0, class_validator_1.ValidateIf)((o) => o.status === WelcomeBonusStatusEnum_1.WelcomeBonusStatusEnum.ACCREDITED),
|
|
55
|
+
trim(),
|
|
56
|
+
(0, class_validator_1.IsString)(),
|
|
57
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'processorTransactionId es obligatorio cuando status es ACCREDITED' }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], WelcomeAccreditationResultRequest.prototype, "processorTransactionId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_transformer_1.Expose)(),
|
|
62
|
+
(0, class_validator_1.ValidateIf)((o) => STATUSES_REQUIRING_REASON.includes(o.status)),
|
|
63
|
+
trim(),
|
|
64
|
+
(0, class_validator_1.IsString)(),
|
|
65
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'failReason es obligatorio cuando status es FAILED o UNVERIFIED' }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], WelcomeAccreditationResultRequest.prototype, "failReason", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_transformer_1.Expose)(),
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
trim(),
|
|
72
|
+
(0, class_validator_1.IsString)(),
|
|
73
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], WelcomeAccreditationResultRequest.prototype, "providerName", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CustomerResponse } from './CustomerResponse';
|
|
2
|
+
import { WelcomeBonusResponse } from './WelcomeBonusResponse';
|
|
3
|
+
/**
|
|
4
|
+
* Respuesta de la reserva del bono de bienvenida (D33): el cliente con el candado ya tomado y el
|
|
5
|
+
* asiento recién abierto en `PENDING`. SureKeep Fase 2 — pista Retail.
|
|
6
|
+
*
|
|
7
|
+
* El `bonus.bonusKey` es lo que el caller guarda para cerrar el asiento con el resultado del processor.
|
|
8
|
+
*/
|
|
9
|
+
export interface WelcomeAccreditationResponse {
|
|
10
|
+
customer: CustomerResponse;
|
|
11
|
+
bonus: WelcomeBonusResponse;
|
|
12
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { WelcomeBonusAmountSourceEnum } from '../../enums/WelcomeBonusAmountSourceEnum';
|
|
2
|
+
import { WelcomeBonusSettlementStatusEnum } from '../../enums/WelcomeBonusSettlementStatusEnum';
|
|
3
|
+
import { WelcomeBonusStatusEnum } from '../../enums/WelcomeBonusStatusEnum';
|
|
4
|
+
/**
|
|
5
|
+
* Asiento del bono de bienvenida (D33) hacia el consumidor. SureKeep Fase 2 — pista Retail.
|
|
6
|
+
*
|
|
7
|
+
* Es el libro contable del bono: monto, venta, tienda, vendedor y resultado del processor, para
|
|
8
|
+
* conciliar contra quien absorbe el costo (`fundedBy`). La unicidad del bono NO vive acá — sigue en
|
|
9
|
+
* `RetailCustomer.welcomeAccredited`.
|
|
10
|
+
*
|
|
11
|
+
* ⚠️ **Sin PII**: no lleva nombre, teléfono ni CLABE. El Cliente 360 los resuelve por
|
|
12
|
+
* `retailCustomerId`.
|
|
13
|
+
*/
|
|
14
|
+
export interface WelcomeBonusResponse {
|
|
15
|
+
bonusId: string;
|
|
16
|
+
/** Referencia opaca del asiento — es lo que el caller manda para cerrarlo. */
|
|
17
|
+
bonusKey: string;
|
|
18
|
+
retailCustomerId: string;
|
|
19
|
+
fiadoDirectoryId: string | null;
|
|
20
|
+
saleId: string | null;
|
|
21
|
+
folio: string | null;
|
|
22
|
+
wizardSessionId: string | null;
|
|
23
|
+
retailerId: string | null;
|
|
24
|
+
/** Tienda donde se dio el bono. `UNKNOWN` cuando el caller no la declaró. */
|
|
25
|
+
storeId: string;
|
|
26
|
+
sellerRetailUserId: string | null;
|
|
27
|
+
amountCents: number | null;
|
|
28
|
+
currency: string;
|
|
29
|
+
amountSource: WelcomeBonusAmountSourceEnum | null;
|
|
30
|
+
status: WelcomeBonusStatusEnum;
|
|
31
|
+
failReason: string | null;
|
|
32
|
+
requestedAt: string;
|
|
33
|
+
resolvedAt: string | null;
|
|
34
|
+
processorTransactionId: string | null;
|
|
35
|
+
idempotencyKey: string | null;
|
|
36
|
+
providerName: string | null;
|
|
37
|
+
/** Quién absorbe el costo del bono. */
|
|
38
|
+
fundedBy: string;
|
|
39
|
+
settlementStatus: WelcomeBonusSettlementStatusEnum;
|
|
40
|
+
settlementBatchId: string | null;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
updatedAt: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* De dónde salió el monto del bono. SureKeep Fase 2 — pista Retail.
|
|
3
|
+
*
|
|
4
|
+
* El resolver del wizard cae a un default local cuando `loan-config` no responde; para conciliar
|
|
5
|
+
* importa distinguir el monto parametrizado del que salió del fallback.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum WelcomeBonusAmountSourceEnum {
|
|
8
|
+
/** Parámetro de negocio de `loan-config` (`WELCOME_BONUS/amount_cents`). */
|
|
9
|
+
PARAM = "PARAM",
|
|
10
|
+
/** Default local del wizard, usado porque `loan-config` no respondió. */
|
|
11
|
+
DEFAULT = "DEFAULT"
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WelcomeBonusAmountSourceEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* De dónde salió el monto del bono. SureKeep Fase 2 — pista Retail.
|
|
6
|
+
*
|
|
7
|
+
* El resolver del wizard cae a un default local cuando `loan-config` no responde; para conciliar
|
|
8
|
+
* importa distinguir el monto parametrizado del que salió del fallback.
|
|
9
|
+
*/
|
|
10
|
+
var WelcomeBonusAmountSourceEnum;
|
|
11
|
+
(function (WelcomeBonusAmountSourceEnum) {
|
|
12
|
+
/** Parámetro de negocio de `loan-config` (`WELCOME_BONUS/amount_cents`). */
|
|
13
|
+
WelcomeBonusAmountSourceEnum["PARAM"] = "PARAM";
|
|
14
|
+
/** Default local del wizard, usado porque `loan-config` no respondió. */
|
|
15
|
+
WelcomeBonusAmountSourceEnum["DEFAULT"] = "DEFAULT";
|
|
16
|
+
})(WelcomeBonusAmountSourceEnum || (exports.WelcomeBonusAmountSourceEnum = WelcomeBonusAmountSourceEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado de conciliación del asiento contra quien absorbe el costo del bono (`fundedBy`).
|
|
3
|
+
* SureKeep Fase 2 — pista Retail.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum WelcomeBonusSettlementStatusEnum {
|
|
6
|
+
/** Asentado y todavía no remitido a quien lo financia. */
|
|
7
|
+
PENDING = "PENDING",
|
|
8
|
+
/** Ya incluido en un lote de remisión (`settlementBatchId`). */
|
|
9
|
+
REMITTED = "REMITTED"
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WelcomeBonusSettlementStatusEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Estado de conciliación del asiento contra quien absorbe el costo del bono (`fundedBy`).
|
|
6
|
+
* SureKeep Fase 2 — pista Retail.
|
|
7
|
+
*/
|
|
8
|
+
var WelcomeBonusSettlementStatusEnum;
|
|
9
|
+
(function (WelcomeBonusSettlementStatusEnum) {
|
|
10
|
+
/** Asentado y todavía no remitido a quien lo financia. */
|
|
11
|
+
WelcomeBonusSettlementStatusEnum["PENDING"] = "PENDING";
|
|
12
|
+
/** Ya incluido en un lote de remisión (`settlementBatchId`). */
|
|
13
|
+
WelcomeBonusSettlementStatusEnum["REMITTED"] = "REMITTED";
|
|
14
|
+
})(WelcomeBonusSettlementStatusEnum || (exports.WelcomeBonusSettlementStatusEnum = WelcomeBonusSettlementStatusEnum = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado del asiento del bono de bienvenida (D33). SureKeep Fase 2 — pista Retail.
|
|
3
|
+
*
|
|
4
|
+
* El fallo del processor NO es una sola cosa: `FAILED` es un rechazo inequívoco y libera el candado
|
|
5
|
+
* `welcomeAccredited` para reintentar; `UNVERIFIED` es un fallo ambiguo (timeout, 5xx) que pudo haber
|
|
6
|
+
* movido plata, así que el candado queda tomado y el caso va a revisión manual.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum WelcomeBonusStatusEnum {
|
|
9
|
+
/** Asiento reservado, antes de llamar al processor. */
|
|
10
|
+
PENDING = "PENDING",
|
|
11
|
+
/** El processor confirmó la acreditación (llega con `processorTransactionId`). */
|
|
12
|
+
ACCREDITED = "ACCREDITED",
|
|
13
|
+
/** Rechazo inequívoco del processor. Libera el candado → reintentable. */
|
|
14
|
+
FAILED = "FAILED",
|
|
15
|
+
/** Fallo ambiguo: no se sabe si acreditó. Candado tomado → revisión manual. */
|
|
16
|
+
UNVERIFIED = "UNVERIFIED"
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WelcomeBonusStatusEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Estado del asiento del bono de bienvenida (D33). SureKeep Fase 2 — pista Retail.
|
|
6
|
+
*
|
|
7
|
+
* El fallo del processor NO es una sola cosa: `FAILED` es un rechazo inequívoco y libera el candado
|
|
8
|
+
* `welcomeAccredited` para reintentar; `UNVERIFIED` es un fallo ambiguo (timeout, 5xx) que pudo haber
|
|
9
|
+
* movido plata, así que el candado queda tomado y el caso va a revisión manual.
|
|
10
|
+
*/
|
|
11
|
+
var WelcomeBonusStatusEnum;
|
|
12
|
+
(function (WelcomeBonusStatusEnum) {
|
|
13
|
+
/** Asiento reservado, antes de llamar al processor. */
|
|
14
|
+
WelcomeBonusStatusEnum["PENDING"] = "PENDING";
|
|
15
|
+
/** El processor confirmó la acreditación (llega con `processorTransactionId`). */
|
|
16
|
+
WelcomeBonusStatusEnum["ACCREDITED"] = "ACCREDITED";
|
|
17
|
+
/** Rechazo inequívoco del processor. Libera el candado → reintentable. */
|
|
18
|
+
WelcomeBonusStatusEnum["FAILED"] = "FAILED";
|
|
19
|
+
/** Fallo ambiguo: no se sabe si acreditó. Candado tomado → revisión manual. */
|
|
20
|
+
WelcomeBonusStatusEnum["UNVERIFIED"] = "UNVERIFIED";
|
|
21
|
+
})(WelcomeBonusStatusEnum || (exports.WelcomeBonusStatusEnum = WelcomeBonusStatusEnum = {}));
|
|
@@ -3,6 +3,9 @@ export * from './enums/RetailKycStatusEnum';
|
|
|
3
3
|
export * from './enums/KycModalityEnum';
|
|
4
4
|
export * from './enums/KycReviewResultEnum';
|
|
5
5
|
export * from './enums/RetailCustomerStatusEnum';
|
|
6
|
+
export * from './enums/WelcomeBonusStatusEnum';
|
|
7
|
+
export * from './enums/WelcomeBonusAmountSourceEnum';
|
|
8
|
+
export * from './enums/WelcomeBonusSettlementStatusEnum';
|
|
6
9
|
export * from './dtos/KycReview';
|
|
7
10
|
export * from './dtos/RetailAddress';
|
|
8
11
|
export * from './dtos/RetailCustomer';
|
|
@@ -11,8 +14,12 @@ export * from './dtos/requests/UpsertCustomerFromKycRequest';
|
|
|
11
14
|
export * from './dtos/requests/UpdateCustomerRequest';
|
|
12
15
|
export * from './dtos/requests/AccountResultRequest';
|
|
13
16
|
export * from './dtos/requests/KycReviewRequest';
|
|
17
|
+
export * from './dtos/requests/WelcomeAccreditationRequest';
|
|
18
|
+
export * from './dtos/requests/WelcomeAccreditationResultRequest';
|
|
14
19
|
export * from './dtos/responses/CustomerResponse';
|
|
15
20
|
export * from './dtos/responses/Customer360Response';
|
|
21
|
+
export * from './dtos/responses/WelcomeBonusResponse';
|
|
22
|
+
export * from './dtos/responses/WelcomeAccreditationResponse';
|
|
16
23
|
export * from './events/CustomerCreatedV1';
|
|
17
24
|
export * from './events/CustomerUpdatedV1';
|
|
18
25
|
export * from './events/CustomerKycVerifiedV1';
|
|
@@ -20,6 +20,9 @@ __exportStar(require("./enums/RetailKycStatusEnum"), exports);
|
|
|
20
20
|
__exportStar(require("./enums/KycModalityEnum"), exports);
|
|
21
21
|
__exportStar(require("./enums/KycReviewResultEnum"), exports);
|
|
22
22
|
__exportStar(require("./enums/RetailCustomerStatusEnum"), exports);
|
|
23
|
+
__exportStar(require("./enums/WelcomeBonusStatusEnum"), exports);
|
|
24
|
+
__exportStar(require("./enums/WelcomeBonusAmountSourceEnum"), exports);
|
|
25
|
+
__exportStar(require("./enums/WelcomeBonusSettlementStatusEnum"), exports);
|
|
23
26
|
// Entidades (planas, con class-validator + @Expose)
|
|
24
27
|
__exportStar(require("./dtos/KycReview"), exports);
|
|
25
28
|
__exportStar(require("./dtos/RetailAddress"), exports);
|
|
@@ -30,9 +33,13 @@ __exportStar(require("./dtos/requests/UpsertCustomerFromKycRequest"), exports);
|
|
|
30
33
|
__exportStar(require("./dtos/requests/UpdateCustomerRequest"), exports);
|
|
31
34
|
__exportStar(require("./dtos/requests/AccountResultRequest"), exports);
|
|
32
35
|
__exportStar(require("./dtos/requests/KycReviewRequest"), exports);
|
|
36
|
+
__exportStar(require("./dtos/requests/WelcomeAccreditationRequest"), exports);
|
|
37
|
+
__exportStar(require("./dtos/requests/WelcomeAccreditationResultRequest"), exports);
|
|
33
38
|
// Response DTOs
|
|
34
39
|
__exportStar(require("./dtos/responses/CustomerResponse"), exports);
|
|
35
40
|
__exportStar(require("./dtos/responses/Customer360Response"), exports);
|
|
41
|
+
__exportStar(require("./dtos/responses/WelcomeBonusResponse"), exports);
|
|
42
|
+
__exportStar(require("./dtos/responses/WelcomeAccreditationResponse"), exports);
|
|
36
43
|
// Contratos de eventos (PascalCase + sufijo V1)
|
|
37
44
|
__exportStar(require("./events/CustomerCreatedV1"), exports);
|
|
38
45
|
__exportStar(require("./events/CustomerUpdatedV1"), exports);
|
|
@@ -19,18 +19,4 @@ export declare class CreditWalletFundingRequest {
|
|
|
19
19
|
center?: string;
|
|
20
20
|
/** Si viene, la FiadoTx se crea con este folio en vez de generar uno nuevo. */
|
|
21
21
|
processorTransactionNumber?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Producto de `ProductCatalog_GT` con el que tarifar este fondeo — de ahi
|
|
24
|
-
* salen la comision que Fiado le cobra al cliente y su IVA.
|
|
25
|
-
*
|
|
26
|
-
* Lo decide el CONNECTOR y no el processor porque la tarifa depende del
|
|
27
|
-
* canal, y solo el connector ve donde pago el cliente: el proveedor manda
|
|
28
|
-
* el comercio en el webhook del cash-in. Ej. `SP_CASH_IN` (cuota fija fuera
|
|
29
|
-
* de OXXO) vs `SP_CASH_IN_OXXO` (porcentual en OXXO).
|
|
30
|
-
*
|
|
31
|
-
* Opcional por compatibilidad: los callers que no lo mandan siguen cayendo
|
|
32
|
-
* al producto por defecto del processor (`MEX_WALLET_FUNDING_CREDIT`), que
|
|
33
|
-
* es el que usa Equality/Passport hoy.
|
|
34
|
-
*/
|
|
35
|
-
productCatalogId?: string;
|
|
36
22
|
}
|
|
@@ -65,9 +65,3 @@ __decorate([
|
|
|
65
65
|
(0, class_validator_1.MaxLength)(64),
|
|
66
66
|
__metadata("design:type", String)
|
|
67
67
|
], CreditWalletFundingRequest.prototype, "processorTransactionNumber", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, class_validator_1.IsOptional)(),
|
|
70
|
-
(0, class_validator_1.IsString)(),
|
|
71
|
-
(0, class_validator_1.MaxLength)(64),
|
|
72
|
-
__metadata("design:type", String)
|
|
73
|
-
], CreditWalletFundingRequest.prototype, "productCatalogId", void 0);
|