@fiado/type-kit 3.534.0 → 3.535.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/retailWizard/sessionFinanciersShapes.test.ts +26 -0
- package/bin/retailWizard/dtos/responses/SessionFinanciersResponse.d.ts +4 -1
- package/bin/retailWizard/enums/FinancierIneligibleReasonEnum.d.ts +5 -0
- package/bin/retailWizard/enums/FinancierIneligibleReasonEnum.js +9 -0
- package/bin/retailWizard/index.d.ts +1 -0
- package/bin/retailWizard/index.js +1 -0
- package/package.json +1 -1
- package/src/retailWizard/dtos/responses/SessionFinanciersResponse.ts +4 -1
- package/src/retailWizard/enums/FinancierIneligibleReasonEnum.ts +5 -0
- package/src/retailWizard/index.ts +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { FinancierTypeEnum } from '../../../src/loanOfferings/enums/FinancierTypeEnum';
|
|
3
|
+
import {
|
|
4
|
+
FinancierIneligibleReasonEnum,
|
|
5
|
+
type SessionFinanciersResponse,
|
|
6
|
+
} from '../../../src/retailWizard';
|
|
7
|
+
|
|
8
|
+
describe('SessionFinanciersResponse', () => {
|
|
9
|
+
it('declara el motivo tipado de una financiera no elegible', () => {
|
|
10
|
+
const response: SessionFinanciersResponse = {
|
|
11
|
+
financiers: [
|
|
12
|
+
{
|
|
13
|
+
code: 'SUREKEEP',
|
|
14
|
+
name: 'SureKeep',
|
|
15
|
+
label: 'Nuestra financiera',
|
|
16
|
+
type: FinancierTypeEnum.INTERNAL,
|
|
17
|
+
displayOrder: 1,
|
|
18
|
+
externalRedirectUrl: null,
|
|
19
|
+
eligible: false,
|
|
20
|
+
ineligibleReason: FinancierIneligibleReasonEnum.ACTIVE_CREDIT,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
expect(response.financiers[0].ineligibleReason).toBe('ACTIVE_CREDIT');
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FinancierTypeEnum } from '../../../loanOfferings/enums/FinancierTypeEnum';
|
|
2
|
+
import type { FinancierIneligibleReasonEnum } from '../../enums/FinancierIneligibleReasonEnum';
|
|
2
3
|
/**
|
|
3
4
|
* Una opción de financiamiento del paso 04 (pantalla forma de pago): la unión de las financieras
|
|
4
5
|
* ACTIVE del catálogo SOFOM (`loan-offerings GET /private/financiers/active` — display + orden)
|
|
@@ -14,8 +15,10 @@ export interface SessionFinancierOption {
|
|
|
14
15
|
displayOrder: number;
|
|
15
16
|
/** Solo EXTERNAL: URL de derivación. */
|
|
16
17
|
externalRedirectUrl: string | null;
|
|
17
|
-
/**
|
|
18
|
+
/** Se puede elegir: el producto la admite y, en INTERNAL, el cliente no tiene crédito vivo. */
|
|
18
19
|
eligible: boolean;
|
|
20
|
+
/** Por qué no se puede elegir; ausente cuando `eligible` es `true` o el motivo es el producto. */
|
|
21
|
+
ineligibleReason?: FinancierIneligibleReasonEnum;
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
21
24
|
* GET /wizard/sessions/:id/financiers — las opciones de financiamiento del paso 04 para la sesión
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Por qué una financiera del paso «¿Cómo va a pagar?» no se puede elegir en esta venta. */
|
|
2
|
+
export declare enum FinancierIneligibleReasonEnum {
|
|
3
|
+
/** El cliente ya tiene un crédito vivo (por activar, al corriente o en mora): no se origina otro. */
|
|
4
|
+
ACTIVE_CREDIT = "ACTIVE_CREDIT"
|
|
5
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FinancierIneligibleReasonEnum = void 0;
|
|
4
|
+
/** Por qué una financiera del paso «¿Cómo va a pagar?» no se puede elegir en esta venta. */
|
|
5
|
+
var FinancierIneligibleReasonEnum;
|
|
6
|
+
(function (FinancierIneligibleReasonEnum) {
|
|
7
|
+
/** El cliente ya tiene un crédito vivo (por activar, al corriente o en mora): no se origina otro. */
|
|
8
|
+
FinancierIneligibleReasonEnum["ACTIVE_CREDIT"] = "ACTIVE_CREDIT";
|
|
9
|
+
})(FinancierIneligibleReasonEnum || (exports.FinancierIneligibleReasonEnum = FinancierIneligibleReasonEnum = {}));
|
|
@@ -22,6 +22,7 @@ export * from './enums/SystemCancelReasonEnum';
|
|
|
22
22
|
export * from './enums/AppOnboardingStepEnum';
|
|
23
23
|
export * from './enums/AppOnboardingStepStatusEnum';
|
|
24
24
|
export * from './enums/BlockedReasonEnum';
|
|
25
|
+
export * from './enums/FinancierIneligibleReasonEnum';
|
|
25
26
|
export * from './enums/BlockedCategoryEnum';
|
|
26
27
|
export * from './enums/WizardLineStatusEnum';
|
|
27
28
|
export * from './enums/LinePaymentTypeEnum';
|
|
@@ -41,6 +41,7 @@ __exportStar(require("./enums/SystemCancelReasonEnum"), exports);
|
|
|
41
41
|
__exportStar(require("./enums/AppOnboardingStepEnum"), exports);
|
|
42
42
|
__exportStar(require("./enums/AppOnboardingStepStatusEnum"), exports);
|
|
43
43
|
__exportStar(require("./enums/BlockedReasonEnum"), exports);
|
|
44
|
+
__exportStar(require("./enums/FinancierIneligibleReasonEnum"), exports);
|
|
44
45
|
__exportStar(require("./enums/BlockedCategoryEnum"), exports);
|
|
45
46
|
__exportStar(require("./enums/WizardLineStatusEnum"), exports);
|
|
46
47
|
__exportStar(require("./enums/LinePaymentTypeEnum"), exports);
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FinancierTypeEnum } from '../../../loanOfferings/enums/FinancierTypeEnum';
|
|
2
|
+
import type { FinancierIneligibleReasonEnum } from '../../enums/FinancierIneligibleReasonEnum';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Una opción de financiamiento del paso 04 (pantalla forma de pago): la unión de las financieras
|
|
@@ -15,8 +16,10 @@ export interface SessionFinancierOption {
|
|
|
15
16
|
displayOrder: number;
|
|
16
17
|
/** Solo EXTERNAL: URL de derivación. */
|
|
17
18
|
externalRedirectUrl: string | null;
|
|
18
|
-
/**
|
|
19
|
+
/** Se puede elegir: el producto la admite y, en INTERNAL, el cliente no tiene crédito vivo. */
|
|
19
20
|
eligible: boolean;
|
|
21
|
+
/** Por qué no se puede elegir; ausente cuando `eligible` es `true` o el motivo es el producto. */
|
|
22
|
+
ineligibleReason?: FinancierIneligibleReasonEnum;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
/**
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Por qué una financiera del paso «¿Cómo va a pagar?» no se puede elegir en esta venta. */
|
|
2
|
+
export enum FinancierIneligibleReasonEnum {
|
|
3
|
+
/** El cliente ya tiene un crédito vivo (por activar, al corriente o en mora): no se origina otro. */
|
|
4
|
+
ACTIVE_CREDIT = 'ACTIVE_CREDIT',
|
|
5
|
+
}
|
|
@@ -25,6 +25,7 @@ export * from './enums/SystemCancelReasonEnum';
|
|
|
25
25
|
export * from './enums/AppOnboardingStepEnum';
|
|
26
26
|
export * from './enums/AppOnboardingStepStatusEnum';
|
|
27
27
|
export * from './enums/BlockedReasonEnum';
|
|
28
|
+
export * from './enums/FinancierIneligibleReasonEnum';
|
|
28
29
|
export * from './enums/BlockedCategoryEnum';
|
|
29
30
|
export * from './enums/WizardLineStatusEnum';
|
|
30
31
|
export * from './enums/LinePaymentTypeEnum';
|