@fiado/type-kit 3.396.0 → 3.397.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.
@@ -8,6 +8,11 @@ import { SciInternalHistoryInput } from './SciInternalHistoryInput';
8
8
  export declare class EvaluateSciRequest {
9
9
  /** Acreditado a evaluar (`LoanBorrower`). La evaluación queda ligada a él en el historial. */
10
10
  borrowerId: string;
11
+ /**
12
+ * Cliente retail dueño del acreditado. Se guarda en el snapshot para que el listado del
13
+ * backoffice resuelva el nombre sin volver a preguntarle a loan-credit de quién es.
14
+ */
15
+ retailCustomerId?: string;
11
16
  /** CURP del solicitante (requerido por los proveedores de scoring). */
12
17
  curp: string;
13
18
  /** Celular del solicitante (requerido por Modelias). */
@@ -27,6 +27,12 @@ __decorate([
27
27
  (0, class_validator_1.IsNotEmpty)(),
28
28
  __metadata("design:type", String)
29
29
  ], EvaluateSciRequest.prototype, "borrowerId", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsOptional)(),
32
+ (0, class_validator_1.IsString)(),
33
+ (0, class_validator_1.IsNotEmpty)(),
34
+ __metadata("design:type", String)
35
+ ], EvaluateSciRequest.prototype, "retailCustomerId", void 0);
30
36
  __decorate([
31
37
  (0, class_validator_1.IsString)(),
32
38
  (0, class_validator_1.IsNotEmpty)(),
@@ -0,0 +1,29 @@
1
+ import { PaginatedResult } from '../../../retailOrg/dtos/PaginatedResult';
2
+ import { SciEvaluationResponse } from './SciEvaluationResponse';
3
+ /**
4
+ * Fila lista para pintar del listado de evaluaciones del tenant: la evaluación más el contexto
5
+ * del cliente ya resuelto por el motor. El front no cruza nada.
6
+ */
7
+ export interface SciEvaluationListItem {
8
+ evaluation: SciEvaluationResponse;
9
+ /** Cliente retail dueño del acreditado. `null` en las evaluaciones anteriores al campo. */
10
+ retailCustomerId: string | null;
11
+ /** `null` cuando el nombre no se pudo resolver; el front pinta el id, nunca un vacío. */
12
+ customerName: string | null;
13
+ /**
14
+ * `null` mientras el lote del padrón no devuelva teléfono: hoy solo proyecta el nombre.
15
+ * Viaja igual para que el contrato de la fila no cambie cuando lo devuelva.
16
+ */
17
+ customerPhone: string | null;
18
+ }
19
+ /**
20
+ * Página del listado de evaluaciones del tenant, ordenada de la más nueva a la más vieja.
21
+ * Usa el sobre paginado canónico (`items` + `count` + `nextToken` ausente en la última página).
22
+ */
23
+ export interface ListSciEvaluationsResponse extends PaginatedResult<SciEvaluationListItem> {
24
+ /**
25
+ * Filas con `retailCustomerId` cuyo nombre no se resolvió — porque el padrón no lo tiene o
26
+ * porque no contestó. La pantalla lo anuncia en vez de dejar huecos sin explicación.
27
+ */
28
+ unresolvedCustomerCount: number;
29
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,3 +9,4 @@ export * from './dtos/requests/EvaluateSciRequest';
9
9
  export * from './dtos/requests/SciInternalHistoryInput';
10
10
  export * from './dtos/responses/EvaluateSciResponse';
11
11
  export * from './dtos/responses/SciEvaluationResponse';
12
+ export * from './dtos/responses/ListSciEvaluationsResponse';
@@ -29,3 +29,4 @@ __exportStar(require("./dtos/requests/SciInternalHistoryInput"), exports);
29
29
  // Response DTOs
30
30
  __exportStar(require("./dtos/responses/EvaluateSciResponse"), exports);
31
31
  __exportStar(require("./dtos/responses/SciEvaluationResponse"), exports);
32
+ __exportStar(require("./dtos/responses/ListSciEvaluationsResponse"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.396.0",
3
+ "version": "3.397.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -14,6 +14,15 @@ export class EvaluateSciRequest {
14
14
  @IsNotEmpty()
15
15
  borrowerId!: string;
16
16
 
17
+ /**
18
+ * Cliente retail dueño del acreditado. Se guarda en el snapshot para que el listado del
19
+ * backoffice resuelva el nombre sin volver a preguntarle a loan-credit de quién es.
20
+ */
21
+ @IsOptional()
22
+ @IsString()
23
+ @IsNotEmpty()
24
+ retailCustomerId?: string;
25
+
17
26
  /** CURP del solicitante (requerido por los proveedores de scoring). */
18
27
  @IsString()
19
28
  @IsNotEmpty()
@@ -0,0 +1,31 @@
1
+ import { PaginatedResult } from '../../../retailOrg/dtos/PaginatedResult';
2
+ import { SciEvaluationResponse } from './SciEvaluationResponse';
3
+
4
+ /**
5
+ * Fila lista para pintar del listado de evaluaciones del tenant: la evaluación más el contexto
6
+ * del cliente ya resuelto por el motor. El front no cruza nada.
7
+ */
8
+ export interface SciEvaluationListItem {
9
+ evaluation: SciEvaluationResponse;
10
+ /** Cliente retail dueño del acreditado. `null` en las evaluaciones anteriores al campo. */
11
+ retailCustomerId: string | null;
12
+ /** `null` cuando el nombre no se pudo resolver; el front pinta el id, nunca un vacío. */
13
+ customerName: string | null;
14
+ /**
15
+ * `null` mientras el lote del padrón no devuelva teléfono: hoy solo proyecta el nombre.
16
+ * Viaja igual para que el contrato de la fila no cambie cuando lo devuelva.
17
+ */
18
+ customerPhone: string | null;
19
+ }
20
+
21
+ /**
22
+ * Página del listado de evaluaciones del tenant, ordenada de la más nueva a la más vieja.
23
+ * Usa el sobre paginado canónico (`items` + `count` + `nextToken` ausente en la última página).
24
+ */
25
+ export interface ListSciEvaluationsResponse extends PaginatedResult<SciEvaluationListItem> {
26
+ /**
27
+ * Filas con `retailCustomerId` cuyo nombre no se resolvió — porque el padrón no lo tiene o
28
+ * porque no contestó. La pantalla lo anuncia en vez de dejar huecos sin explicación.
29
+ */
30
+ unresolvedCustomerCount: number;
31
+ }
@@ -16,3 +16,4 @@ export * from './dtos/requests/SciInternalHistoryInput';
16
16
  // Response DTOs
17
17
  export * from './dtos/responses/EvaluateSciResponse';
18
18
  export * from './dtos/responses/SciEvaluationResponse';
19
+ export * from './dtos/responses/ListSciEvaluationsResponse';