@fiado/type-kit 3.368.0 → 3.370.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/bin/loanCredit/dtos/AppliedPromotionSnapshot.d.ts +13 -0
- package/bin/loanCredit/dtos/AppliedPromotionSnapshot.js +2 -0
- package/bin/loanCredit/dtos/responses/LoanCreditResponse.d.ts +3 -0
- package/bin/loanCredit/dtos/responses/LoanDevicePinUnlockResult.d.ts +15 -0
- package/bin/loanCredit/dtos/responses/LoanDevicePinUnlockResult.js +11 -0
- package/bin/loanCredit/index.d.ts +2 -0
- package/bin/loanCredit/index.js +2 -0
- package/bin/loanOfferings/dtos/requests/ConsumePromotionRequest.d.ts +7 -0
- package/bin/loanOfferings/dtos/requests/ConsumePromotionRequest.js +26 -0
- package/bin/loanOfferings/dtos/responses/ConsumePromotionResponse.d.ts +12 -0
- package/bin/loanOfferings/dtos/responses/ConsumePromotionResponse.js +2 -0
- package/bin/loanOfferings/index.d.ts +2 -0
- package/bin/loanOfferings/index.js +2 -0
- package/package.json +1 -1
- package/src/loanCredit/dtos/AppliedPromotionSnapshot.ts +14 -0
- package/src/loanCredit/dtos/responses/LoanCreditResponse.ts +3 -0
- package/src/loanCredit/dtos/responses/LoanDevicePinUnlockResult.ts +19 -0
- package/src/loanCredit/index.ts +2 -0
- package/src/loanOfferings/dtos/requests/ConsumePromotionRequest.ts +12 -0
- package/src/loanOfferings/dtos/responses/ConsumePromotionResponse.ts +12 -0
- package/src/loanOfferings/index.ts +2 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PromotionEffectKindEnum } from '../../loanOfferings/enums/PromotionEffectKindEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Promoción con la que se cotizó este crédito, congelada al originar y al re-cotizar. Los términos
|
|
4
|
+
* del crédito YA la incluyen: es el porqué de la cuota, no un extra a sumar.
|
|
5
|
+
*/
|
|
6
|
+
export interface AppliedPromotionSnapshot {
|
|
7
|
+
promotionId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
/** Edición de la promoción al cotizar. Con `promotionId` + `version` la bitácora la reconstruye. */
|
|
10
|
+
version: number;
|
|
11
|
+
/** Palancas del plan que la promoción pisó. */
|
|
12
|
+
appliedEffects: PromotionEffectKindEnum[];
|
|
13
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClientLevelEnum } from '../../../loanScoring/enums/ClientLevelEnum';
|
|
2
2
|
import { LoanCreditStatusEnum } from '../../enums/LoanCreditStatusEnum';
|
|
3
|
+
import { AppliedPromotionSnapshot } from '../AppliedPromotionSnapshot';
|
|
3
4
|
/**
|
|
4
5
|
* Response de los endpoints de LoanCredit (loan-credit-business). Montos en cents; TNA decimal.
|
|
5
6
|
*/
|
|
@@ -28,6 +29,8 @@ export interface LoanCreditResponse {
|
|
|
28
29
|
sciEvaluationId?: string;
|
|
29
30
|
sciAtOrigination?: number;
|
|
30
31
|
clientLevelAtOrigination?: ClientLevelEnum;
|
|
32
|
+
/** Promoción con la que se cotizó, o `null` si ninguna alcanzaba a esta venta. */
|
|
33
|
+
appliedPromotion?: AppliedPromotionSnapshot | null;
|
|
31
34
|
activatedAt?: string;
|
|
32
35
|
voluntaryCancelDeadline?: string;
|
|
33
36
|
firstDueDate?: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LoanDeviceOperationResult } from '../LoanDeviceOperationResult';
|
|
2
|
+
import { LoanDeviceMdmStatusEnum } from '../../enums/LoanDeviceMdmStatusEnum';
|
|
3
|
+
/**
|
|
4
|
+
* Resultado por crédito del passcode de desbloqueo. El `pin` es una credencial de un solo uso que
|
|
5
|
+
* el operador le dicta al cliente sin señal: NO se persiste en el expediente ni en la bitácora.
|
|
6
|
+
*/
|
|
7
|
+
export declare class LoanDevicePinUnlockResult extends LoanDeviceOperationResult {
|
|
8
|
+
/** Estado del expediente; pedir el passcode no lo cambia. */
|
|
9
|
+
mdmStatus: LoanDeviceMdmStatusEnum;
|
|
10
|
+
/** Solo viaja cuando el proveedor lo entregó. */
|
|
11
|
+
pin?: string;
|
|
12
|
+
/** Vigencia del passcode en segundos, tal como la reporta el proveedor. */
|
|
13
|
+
validitySeconds?: number;
|
|
14
|
+
generatedAt?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoanDevicePinUnlockResult = void 0;
|
|
4
|
+
const LoanDeviceOperationResult_1 = require("../LoanDeviceOperationResult");
|
|
5
|
+
/**
|
|
6
|
+
* Resultado por crédito del passcode de desbloqueo. El `pin` es una credencial de un solo uso que
|
|
7
|
+
* el operador le dicta al cliente sin señal: NO se persiste en el expediente ni en la bitácora.
|
|
8
|
+
*/
|
|
9
|
+
class LoanDevicePinUnlockResult extends LoanDeviceOperationResult_1.LoanDeviceOperationResult {
|
|
10
|
+
}
|
|
11
|
+
exports.LoanDevicePinUnlockResult = LoanDevicePinUnlockResult;
|
|
@@ -8,6 +8,7 @@ export * from './dtos/LoanCredit';
|
|
|
8
8
|
export * from './dtos/LoanInstallment';
|
|
9
9
|
export * from './dtos/LoanContract';
|
|
10
10
|
export * from './dtos/ActivationChecklist';
|
|
11
|
+
export * from './dtos/AppliedPromotionSnapshot';
|
|
11
12
|
export * from './dtos/requests/UpsertLoanBorrowerRequest';
|
|
12
13
|
export * from './dtos/requests/OriginateLoanCreditRequest';
|
|
13
14
|
export * from './dtos/requests/QuoteLoanCreditRequest';
|
|
@@ -54,5 +55,6 @@ export * from './dtos/responses/LoanDeviceLastSeenResult';
|
|
|
54
55
|
export * from './dtos/responses/LoanDeviceLastSeenResponse';
|
|
55
56
|
export * from './dtos/responses/LoanDeviceLockResult';
|
|
56
57
|
export * from './dtos/responses/LoanDeviceManualLockResponse';
|
|
58
|
+
export * from './dtos/responses/LoanDevicePinUnlockResult';
|
|
57
59
|
export * from './dtos/responses/LoanDeviceUnlockResult';
|
|
58
60
|
export * from './dtos/responses/LoanDeviceManualUnlockResponse';
|
package/bin/loanCredit/index.js
CHANGED
|
@@ -29,6 +29,7 @@ __exportStar(require("./dtos/LoanCredit"), exports);
|
|
|
29
29
|
__exportStar(require("./dtos/LoanInstallment"), exports);
|
|
30
30
|
__exportStar(require("./dtos/LoanContract"), exports);
|
|
31
31
|
__exportStar(require("./dtos/ActivationChecklist"), exports);
|
|
32
|
+
__exportStar(require("./dtos/AppliedPromotionSnapshot"), exports);
|
|
32
33
|
// Request DTOs
|
|
33
34
|
__exportStar(require("./dtos/requests/UpsertLoanBorrowerRequest"), exports);
|
|
34
35
|
__exportStar(require("./dtos/requests/OriginateLoanCreditRequest"), exports);
|
|
@@ -87,5 +88,6 @@ __exportStar(require("./dtos/responses/LoanDeviceLastSeenResult"), exports);
|
|
|
87
88
|
__exportStar(require("./dtos/responses/LoanDeviceLastSeenResponse"), exports);
|
|
88
89
|
__exportStar(require("./dtos/responses/LoanDeviceLockResult"), exports);
|
|
89
90
|
__exportStar(require("./dtos/responses/LoanDeviceManualLockResponse"), exports);
|
|
91
|
+
__exportStar(require("./dtos/responses/LoanDevicePinUnlockResult"), exports);
|
|
90
92
|
__exportStar(require("./dtos/responses/LoanDeviceUnlockResult"), exports);
|
|
91
93
|
__exportStar(require("./dtos/responses/LoanDeviceManualUnlockResponse"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body de POST /private/promotions/:promotionId/consume — el crédito que acaba de activarse bajo
|
|
3
|
+
* esta promoción. `creditId` es la llave de idempotencia: reenviarlo NO vuelve a contar.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ConsumePromotionRequest {
|
|
6
|
+
creditId: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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.ConsumePromotionRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Body de POST /private/promotions/:promotionId/consume — el crédito que acaba de activarse bajo
|
|
17
|
+
* esta promoción. `creditId` es la llave de idempotencia: reenviarlo NO vuelve a contar.
|
|
18
|
+
*/
|
|
19
|
+
class ConsumePromotionRequest {
|
|
20
|
+
}
|
|
21
|
+
exports.ConsumePromotionRequest = ConsumePromotionRequest;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ConsumePromotionRequest.prototype, "creditId", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resultado de registrar el consumo de una promoción. `alreadyCounted` en `true` es un reenvío del
|
|
3
|
+
* mismo crédito: no es error, y los contadores no se movieron.
|
|
4
|
+
*/
|
|
5
|
+
export interface ConsumePromotionResponse {
|
|
6
|
+
promotionId: string;
|
|
7
|
+
alreadyCounted: boolean;
|
|
8
|
+
creditsGenerated: number;
|
|
9
|
+
budgetConsumedCents: number;
|
|
10
|
+
/** `true` si este consumo alcanzó el tope y la promoción quedó en PAUSED. */
|
|
11
|
+
pausedByBudget: boolean;
|
|
12
|
+
}
|
|
@@ -24,9 +24,11 @@ export * from './dtos/requests/PromotionEffectInput';
|
|
|
24
24
|
export * from './dtos/requests/CreatePromotionRequest';
|
|
25
25
|
export * from './dtos/requests/UpdatePromotionRequest';
|
|
26
26
|
export * from './dtos/requests/ChangePromotionStatusRequest';
|
|
27
|
+
export * from './dtos/requests/ConsumePromotionRequest';
|
|
27
28
|
export * from './dtos/responses/CreditPlanResponse';
|
|
28
29
|
export * from './dtos/responses/FinancierResponse';
|
|
29
30
|
export * from './dtos/responses/RetailerCreditPlanResponse';
|
|
30
31
|
export * from './dtos/responses/SimulationResultResponse';
|
|
31
32
|
export * from './dtos/responses/PromotionResponse';
|
|
32
33
|
export * from './dtos/responses/PromotionLogEntryResponse';
|
|
34
|
+
export * from './dtos/responses/ConsumePromotionResponse';
|
|
@@ -43,6 +43,7 @@ __exportStar(require("./dtos/requests/PromotionEffectInput"), exports);
|
|
|
43
43
|
__exportStar(require("./dtos/requests/CreatePromotionRequest"), exports);
|
|
44
44
|
__exportStar(require("./dtos/requests/UpdatePromotionRequest"), exports);
|
|
45
45
|
__exportStar(require("./dtos/requests/ChangePromotionStatusRequest"), exports);
|
|
46
|
+
__exportStar(require("./dtos/requests/ConsumePromotionRequest"), exports);
|
|
46
47
|
// Response DTOs
|
|
47
48
|
__exportStar(require("./dtos/responses/CreditPlanResponse"), exports);
|
|
48
49
|
__exportStar(require("./dtos/responses/FinancierResponse"), exports);
|
|
@@ -50,3 +51,4 @@ __exportStar(require("./dtos/responses/RetailerCreditPlanResponse"), exports);
|
|
|
50
51
|
__exportStar(require("./dtos/responses/SimulationResultResponse"), exports);
|
|
51
52
|
__exportStar(require("./dtos/responses/PromotionResponse"), exports);
|
|
52
53
|
__exportStar(require("./dtos/responses/PromotionLogEntryResponse"), exports);
|
|
54
|
+
__exportStar(require("./dtos/responses/ConsumePromotionResponse"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PromotionEffectKindEnum } from '../../loanOfferings/enums/PromotionEffectKindEnum';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Promoción con la que se cotizó este crédito, congelada al originar y al re-cotizar. Los términos
|
|
5
|
+
* del crédito YA la incluyen: es el porqué de la cuota, no un extra a sumar.
|
|
6
|
+
*/
|
|
7
|
+
export interface AppliedPromotionSnapshot {
|
|
8
|
+
promotionId: string;
|
|
9
|
+
name: string;
|
|
10
|
+
/** Edición de la promoción al cotizar. Con `promotionId` + `version` la bitácora la reconstruye. */
|
|
11
|
+
version: number;
|
|
12
|
+
/** Palancas del plan que la promoción pisó. */
|
|
13
|
+
appliedEffects: PromotionEffectKindEnum[];
|
|
14
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClientLevelEnum } from '../../../loanScoring/enums/ClientLevelEnum';
|
|
2
2
|
import { LoanCreditStatusEnum } from '../../enums/LoanCreditStatusEnum';
|
|
3
|
+
import { AppliedPromotionSnapshot } from '../AppliedPromotionSnapshot';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Response de los endpoints de LoanCredit (loan-credit-business). Montos en cents; TNA decimal.
|
|
@@ -29,6 +30,8 @@ export interface LoanCreditResponse {
|
|
|
29
30
|
sciEvaluationId?: string;
|
|
30
31
|
sciAtOrigination?: number;
|
|
31
32
|
clientLevelAtOrigination?: ClientLevelEnum;
|
|
33
|
+
/** Promoción con la que se cotizó, o `null` si ninguna alcanzaba a esta venta. */
|
|
34
|
+
appliedPromotion?: AppliedPromotionSnapshot | null;
|
|
32
35
|
activatedAt?: string;
|
|
33
36
|
voluntaryCancelDeadline?: string;
|
|
34
37
|
firstDueDate?: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LoanDeviceOperationResult } from '../LoanDeviceOperationResult';
|
|
2
|
+
import { LoanDeviceMdmStatusEnum } from '../../enums/LoanDeviceMdmStatusEnum';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resultado por crédito del passcode de desbloqueo. El `pin` es una credencial de un solo uso que
|
|
6
|
+
* el operador le dicta al cliente sin señal: NO se persiste en el expediente ni en la bitácora.
|
|
7
|
+
*/
|
|
8
|
+
export class LoanDevicePinUnlockResult extends LoanDeviceOperationResult {
|
|
9
|
+
/** Estado del expediente; pedir el passcode no lo cambia. */
|
|
10
|
+
mdmStatus: LoanDeviceMdmStatusEnum;
|
|
11
|
+
|
|
12
|
+
/** Solo viaja cuando el proveedor lo entregó. */
|
|
13
|
+
pin?: string;
|
|
14
|
+
|
|
15
|
+
/** Vigencia del passcode en segundos, tal como la reporta el proveedor. */
|
|
16
|
+
validitySeconds?: number;
|
|
17
|
+
|
|
18
|
+
generatedAt?: string;
|
|
19
|
+
}
|
package/src/loanCredit/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './dtos/LoanCredit';
|
|
|
12
12
|
export * from './dtos/LoanInstallment';
|
|
13
13
|
export * from './dtos/LoanContract';
|
|
14
14
|
export * from './dtos/ActivationChecklist';
|
|
15
|
+
export * from './dtos/AppliedPromotionSnapshot';
|
|
15
16
|
|
|
16
17
|
// Request DTOs
|
|
17
18
|
export * from './dtos/requests/UpsertLoanBorrowerRequest';
|
|
@@ -69,5 +70,6 @@ export * from './dtos/responses/LoanDeviceLastSeenResult';
|
|
|
69
70
|
export * from './dtos/responses/LoanDeviceLastSeenResponse';
|
|
70
71
|
export * from './dtos/responses/LoanDeviceLockResult';
|
|
71
72
|
export * from './dtos/responses/LoanDeviceManualLockResponse';
|
|
73
|
+
export * from './dtos/responses/LoanDevicePinUnlockResult';
|
|
72
74
|
export * from './dtos/responses/LoanDeviceUnlockResult';
|
|
73
75
|
export * from './dtos/responses/LoanDeviceManualUnlockResponse';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Body de POST /private/promotions/:promotionId/consume — el crédito que acaba de activarse bajo
|
|
6
|
+
* esta promoción. `creditId` es la llave de idempotencia: reenviarlo NO vuelve a contar.
|
|
7
|
+
*/
|
|
8
|
+
export class ConsumePromotionRequest {
|
|
9
|
+
@Expose()
|
|
10
|
+
@IsString()
|
|
11
|
+
creditId!: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resultado de registrar el consumo de una promoción. `alreadyCounted` en `true` es un reenvío del
|
|
3
|
+
* mismo crédito: no es error, y los contadores no se movieron.
|
|
4
|
+
*/
|
|
5
|
+
export interface ConsumePromotionResponse {
|
|
6
|
+
promotionId: string;
|
|
7
|
+
alreadyCounted: boolean;
|
|
8
|
+
creditsGenerated: number;
|
|
9
|
+
budgetConsumedCents: number;
|
|
10
|
+
/** `true` si este consumo alcanzó el tope y la promoción quedó en PAUSED. */
|
|
11
|
+
pausedByBudget: boolean;
|
|
12
|
+
}
|
|
@@ -29,6 +29,7 @@ export * from './dtos/requests/PromotionEffectInput';
|
|
|
29
29
|
export * from './dtos/requests/CreatePromotionRequest';
|
|
30
30
|
export * from './dtos/requests/UpdatePromotionRequest';
|
|
31
31
|
export * from './dtos/requests/ChangePromotionStatusRequest';
|
|
32
|
+
export * from './dtos/requests/ConsumePromotionRequest';
|
|
32
33
|
|
|
33
34
|
// Response DTOs
|
|
34
35
|
export * from './dtos/responses/CreditPlanResponse';
|
|
@@ -37,3 +38,4 @@ export * from './dtos/responses/RetailerCreditPlanResponse';
|
|
|
37
38
|
export * from './dtos/responses/SimulationResultResponse';
|
|
38
39
|
export * from './dtos/responses/PromotionResponse';
|
|
39
40
|
export * from './dtos/responses/PromotionLogEntryResponse';
|
|
41
|
+
export * from './dtos/responses/ConsumePromotionResponse';
|