@fiado/type-kit 3.369.0 → 3.371.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/collection/dtos/ResolvePendingChargesRequest.d.ts +12 -0
- package/bin/collection/dtos/ResolvePendingChargesRequest.js +35 -0
- package/bin/collection/index.d.ts +1 -0
- package/bin/collection/index.js +1 -0
- 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/index.d.ts +1 -0
- package/bin/loanCredit/index.js +1 -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/collection/dtos/ResolvePendingChargesRequest.ts +14 -0
- package/src/collection/index.ts +1 -0
- package/src/loanCredit/dtos/AppliedPromotionSnapshot.ts +14 -0
- package/src/loanCredit/dtos/responses/LoanCreditResponse.ts +3 -0
- package/src/loanCredit/index.ts +1 -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,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* El motor pregunta al dominio qué debe un titular ahora mismo.
|
|
3
|
+
*
|
|
4
|
+
* No lleva importe: el monto es justo lo que se está preguntando. Puede haber cambiado desde que el
|
|
5
|
+
* cargo se dio de alta —por mora, o porque el cliente pagó por otra vía— y sólo el dominio, que es
|
|
6
|
+
* quien aplica sus propias reglas, sabe cuánto queda vivo.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ResolvePendingChargesRequest {
|
|
9
|
+
domain: string;
|
|
10
|
+
ownerRef: string;
|
|
11
|
+
tenantId: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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.ResolvePendingChargesRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/**
|
|
15
|
+
* El motor pregunta al dominio qué debe un titular ahora mismo.
|
|
16
|
+
*
|
|
17
|
+
* No lleva importe: el monto es justo lo que se está preguntando. Puede haber cambiado desde que el
|
|
18
|
+
* cargo se dio de alta —por mora, o porque el cliente pagó por otra vía— y sólo el dominio, que es
|
|
19
|
+
* quien aplica sus propias reglas, sabe cuánto queda vivo.
|
|
20
|
+
*/
|
|
21
|
+
class ResolvePendingChargesRequest {
|
|
22
|
+
}
|
|
23
|
+
exports.ResolvePendingChargesRequest = ResolvePendingChargesRequest;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ResolvePendingChargesRequest.prototype, "domain", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ResolvePendingChargesRequest.prototype, "ownerRef", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ResolvePendingChargesRequest.prototype, "tenantId", void 0);
|
|
@@ -16,6 +16,7 @@ export * from './dtos/CollectionProductConfigDto';
|
|
|
16
16
|
export * from './dtos/UpsertProductConfigRequest';
|
|
17
17
|
export * from './dtos/ApplyCollectionResultRequest';
|
|
18
18
|
export * from './dtos/DeregisterChargeResponse';
|
|
19
|
+
export * from './dtos/ResolvePendingChargesRequest';
|
|
19
20
|
export * from './dtos/CollectionIntentSummaryDto';
|
|
20
21
|
export * from './dtos/CollectionAttemptDto';
|
|
21
22
|
export * from './dtos/CollectionOutboxEventDto';
|
package/bin/collection/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __exportStar(require("./dtos/CollectionProductConfigDto"), exports);
|
|
|
34
34
|
__exportStar(require("./dtos/UpsertProductConfigRequest"), exports);
|
|
35
35
|
__exportStar(require("./dtos/ApplyCollectionResultRequest"), exports);
|
|
36
36
|
__exportStar(require("./dtos/DeregisterChargeResponse"), exports);
|
|
37
|
+
__exportStar(require("./dtos/ResolvePendingChargesRequest"), exports);
|
|
37
38
|
// DTOs — backoffice de monitoreo
|
|
38
39
|
__exportStar(require("./dtos/CollectionIntentSummaryDto"), exports);
|
|
39
40
|
__exportStar(require("./dtos/CollectionAttemptDto"), exports);
|
|
@@ -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;
|
|
@@ -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';
|
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);
|
|
@@ -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 { IsString } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* El motor pregunta al dominio qué debe un titular ahora mismo.
|
|
5
|
+
*
|
|
6
|
+
* No lleva importe: el monto es justo lo que se está preguntando. Puede haber cambiado desde que el
|
|
7
|
+
* cargo se dio de alta —por mora, o porque el cliente pagó por otra vía— y sólo el dominio, que es
|
|
8
|
+
* quien aplica sus propias reglas, sabe cuánto queda vivo.
|
|
9
|
+
*/
|
|
10
|
+
export class ResolvePendingChargesRequest {
|
|
11
|
+
@IsString() domain!: string;
|
|
12
|
+
@IsString() ownerRef!: string;
|
|
13
|
+
@IsString() tenantId!: string;
|
|
14
|
+
}
|
package/src/collection/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './dtos/CollectionProductConfigDto';
|
|
|
19
19
|
export * from './dtos/UpsertProductConfigRequest';
|
|
20
20
|
export * from './dtos/ApplyCollectionResultRequest';
|
|
21
21
|
export * from './dtos/DeregisterChargeResponse';
|
|
22
|
+
export * from './dtos/ResolvePendingChargesRequest';
|
|
22
23
|
|
|
23
24
|
// DTOs — backoffice de monitoreo
|
|
24
25
|
export * from './dtos/CollectionIntentSummaryDto';
|
|
@@ -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;
|
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';
|
|
@@ -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';
|