@fiado/type-kit 3.7.0 → 3.7.2
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/benefitCenter/dtos/BannerAction.d.ts +14 -1
- package/bin/benefitCenter/dtos/BannerAction.js +8 -0
- package/bin/benefitCenter/dtos/BannerActionRequest.d.ts +11 -1
- package/bin/benefitCenter/dtos/BannerActionRequest.js +11 -1
- package/bin/benefitCenter/dtos/BannerContent.d.ts +23 -8
- package/bin/benefitCenter/dtos/BannerContent.js +6 -3
- package/bin/benefitCenter/dtos/BannerContentRequest.d.ts +7 -0
- package/bin/benefitCenter/dtos/BannerContentRequest.js +7 -0
- package/bin/benefitCenter/dtos/BannerCreateRequest.d.ts +7 -0
- package/bin/benefitCenter/dtos/BannerCreateRequest.js +7 -0
- package/bin/benefitCenter/dtos/BannerTemplateRequest.d.ts +9 -0
- package/bin/{credit/dtos/EarlyPaymentRequest.js → benefitCenter/dtos/BannerTemplateRequest.js} +15 -20
- package/bin/benefitCenter/dtos/BannerTemplateTheme.d.ts +18 -0
- package/bin/benefitCenter/dtos/BannerTemplateThemeRequest.d.ts +10 -0
- package/bin/{credit/dtos/internal/CreditReversalRequest.js → benefitCenter/dtos/BannerTemplateThemeRequest.js} +18 -9
- package/bin/benefitCenter/dtos/BannerTranslation.d.ts +22 -0
- package/bin/benefitCenter/dtos/BannerTranslationRequest.d.ts +18 -2
- package/bin/benefitCenter/dtos/BannerTranslationRequest.js +19 -2
- package/bin/benefitCenter/dtos/BannerUpdateRequest.d.ts +7 -0
- package/bin/benefitCenter/dtos/BannerUpdateRequest.js +13 -0
- package/bin/benefitCenter/enums/BannerActionTypeEnum.d.ts +11 -3
- package/bin/benefitCenter/enums/BannerActionTypeEnum.js +11 -3
- package/bin/benefitCenter/enums/BannerContentTypeEnum.d.ts +9 -0
- package/bin/benefitCenter/enums/BannerContentTypeEnum.js +9 -0
- package/bin/benefitCenter/enums/BannerScreenEnum.d.ts +11 -0
- package/bin/benefitCenter/enums/BannerScreenEnum.js +15 -0
- package/bin/benefitCenter/enums/BannerTemplateVariantEnum.d.ts +13 -0
- package/bin/benefitCenter/enums/BannerTemplateVariantEnum.js +17 -0
- package/bin/benefitCenter/index.d.ts +6 -0
- package/bin/benefitCenter/index.js +6 -0
- package/package.json +1 -1
- package/src/benefitCenter/dtos/BannerAction.ts +18 -1
- package/src/benefitCenter/dtos/BannerActionRequest.ts +15 -1
- package/src/benefitCenter/dtos/BannerContent.ts +26 -8
- package/src/benefitCenter/dtos/BannerContentRequest.ts +12 -1
- package/src/benefitCenter/dtos/BannerCreateRequest.ts +13 -0
- package/src/benefitCenter/dtos/BannerTemplateRequest.ts +17 -0
- package/src/benefitCenter/dtos/BannerTemplateTheme.ts +18 -0
- package/src/benefitCenter/dtos/BannerTemplateThemeRequest.ts +23 -0
- package/src/benefitCenter/dtos/BannerTranslation.ts +22 -0
- package/src/benefitCenter/dtos/BannerTranslationRequest.ts +24 -2
- package/src/benefitCenter/dtos/BannerUpdateRequest.ts +15 -0
- package/src/benefitCenter/enums/BannerActionTypeEnum.ts +11 -3
- package/src/benefitCenter/enums/BannerContentTypeEnum.ts +9 -0
- package/src/benefitCenter/enums/BannerScreenEnum.ts +11 -0
- package/src/benefitCenter/enums/BannerTemplateVariantEnum.ts +14 -0
- package/src/benefitCenter/index.ts +6 -0
- package/bin/cognitoConnector/dtos/SignUpBackofficeRequest.d.ts +0 -13
- package/bin/cognitoConnector/dtos/SignUpBackofficeRequest.js +0 -71
- package/bin/comission-business/dtos/GenerateReportRequest.d.ts +0 -10
- package/bin/comission-business/dtos/GenerateReportResponse.d.ts +0 -6
- package/bin/comission-business/enums/PaymentStatusEnum.d.ts +0 -5
- package/bin/comission-business/enums/PaymentStatusEnum.js +0 -9
- package/bin/credit/dtos/CreditBannerStateResponse.d.ts +0 -10
- package/bin/credit/dtos/CreditBannerStateResponse.js +0 -6
- package/bin/credit/dtos/CreditDetailResponse.d.ts +0 -23
- package/bin/credit/dtos/CreditDetailResponse.js +0 -6
- package/bin/credit/dtos/CreditEligibilityResponse.d.ts +0 -9
- package/bin/credit/dtos/CreditEligibilityResponse.js +0 -6
- package/bin/credit/dtos/CreditMovementResponse.d.ts +0 -20
- package/bin/credit/dtos/CreditMovementResponse.js +0 -9
- package/bin/credit/dtos/CreditRequestCreate.d.ts +0 -4
- package/bin/credit/dtos/CreditRequestCreate.js +0 -26
- package/bin/credit/dtos/CreditRequestResponse.d.ts +0 -7
- package/bin/credit/dtos/CreditRequestResponse.js +0 -6
- package/bin/credit/dtos/CreditScheduleResponse.d.ts +0 -18
- package/bin/credit/dtos/CreditScheduleResponse.js +0 -9
- package/bin/credit/dtos/CreditStatementResponse.d.ts +0 -11
- package/bin/credit/dtos/CreditStatementResponse.js +0 -9
- package/bin/credit/dtos/EarlyPaymentRequest.d.ts +0 -7
- package/bin/credit/dtos/EarlyPaymentResponse.d.ts +0 -11
- package/bin/credit/dtos/EarlyPaymentResponse.js +0 -6
- package/bin/credit/dtos/internal/CreditBalanceRequest.d.ts +0 -3
- package/bin/credit/dtos/internal/CreditBalanceRequest.js +0 -21
- package/bin/credit/dtos/internal/CreditCollectionRequest.d.ts +0 -11
- package/bin/credit/dtos/internal/CreditCollectionRequest.js +0 -59
- package/bin/credit/dtos/internal/CreditCollectionResponse.d.ts +0 -12
- package/bin/credit/dtos/internal/CreditCollectionResponse.js +0 -6
- package/bin/credit/dtos/internal/CreditDisbursementRequest.d.ts +0 -7
- package/bin/credit/dtos/internal/CreditDisbursementRequest.js +0 -43
- package/bin/credit/dtos/internal/CreditDisbursementResponse.d.ts +0 -8
- package/bin/credit/dtos/internal/CreditDisbursementResponse.js +0 -6
- package/bin/credit/dtos/internal/CreditProfileRequest.d.ts +0 -3
- package/bin/credit/dtos/internal/CreditProfileRequest.js +0 -23
- package/bin/credit/dtos/internal/CreditReversalRequest.d.ts +0 -5
- package/bin/credit/dtos/internal/CreditReversalResponse.d.ts +0 -7
- package/bin/credit/dtos/internal/CreditReversalResponse.js +0 -6
- package/bin/credit/dtos/internal/CreditTransferLoancoRequest.d.ts +0 -8
- package/bin/credit/dtos/internal/CreditTransferLoancoRequest.js +0 -46
- package/bin/credit/dtos/internal/CreditTransferLoancoResponse.d.ts +0 -8
- package/bin/credit/dtos/internal/CreditTransferLoancoResponse.js +0 -6
- package/bin/credit/dtos/internal/DocumentSignRequest.d.ts +0 -3
- package/bin/credit/dtos/internal/DocumentSignRequest.js +0 -21
- package/bin/credit/dtos/internal/LienApplyRequest.d.ts +0 -7
- package/bin/credit/dtos/internal/LienApplyRequest.js +0 -45
- package/bin/credit/enums/CollectionFrequencyEnum.d.ts +0 -5
- package/bin/credit/enums/CollectionFrequencyEnum.js +0 -9
- package/bin/credit/enums/CreditOperationEnum.d.ts +0 -11
- package/bin/credit/enums/CreditOperationEnum.js +0 -15
- package/bin/credit/enums/CreditStatusEnum.d.ts +0 -12
- package/bin/credit/enums/CreditStatusEnum.js +0 -16
- package/bin/credit/enums/DelinquencyLevelEnum.d.ts +0 -9
- package/bin/credit/enums/DelinquencyLevelEnum.js +0 -13
- package/bin/credit/enums/DocumentTypeEnum.d.ts +0 -8
- package/bin/credit/enums/DocumentTypeEnum.js +0 -12
- package/bin/credit/enums/OfferStatusEnum.d.ts +0 -8
- package/bin/credit/enums/OfferStatusEnum.js +0 -12
- package/bin/credit/enums/PaymentTypeEnum.d.ts +0 -9
- package/bin/credit/enums/PaymentTypeEnum.js +0 -13
- package/bin/credit/enums/ReconciliationStatusEnum.d.ts +0 -6
- package/bin/credit/enums/ReconciliationStatusEnum.js +0 -10
- package/bin/credit/enums/TransferStatusEnum.d.ts +0 -8
- package/bin/credit/enums/TransferStatusEnum.js +0 -12
- /package/bin/{comission-business/dtos/GenerateReportRequest.js → benefitCenter/dtos/BannerTemplateTheme.js} +0 -0
- /package/bin/{comission-business/dtos/GenerateReportResponse.js → benefitCenter/dtos/BannerTranslation.js} +0 -0
|
@@ -5,6 +5,8 @@ export * from "./enums/BannerContentTypeEnum";
|
|
|
5
5
|
export * from "./enums/BannerActionTypeEnum";
|
|
6
6
|
export * from "./enums/BannerStatusEnum";
|
|
7
7
|
export * from "./enums/BannerLocaleEnum";
|
|
8
|
+
export * from "./enums/BannerScreenEnum";
|
|
9
|
+
export * from "./enums/BannerTemplateVariantEnum";
|
|
8
10
|
export * from "./dtos/BenefitItem";
|
|
9
11
|
export * from "./dtos/BenefitListResponse";
|
|
10
12
|
export * from "./dtos/BenefitSummary";
|
|
@@ -19,6 +21,8 @@ export * from "./dtos/ServiceLeaf";
|
|
|
19
21
|
export * from "./dtos/BannerContent";
|
|
20
22
|
export * from "./dtos/BannerAction";
|
|
21
23
|
export * from "./dtos/BannerItem";
|
|
24
|
+
export * from "./dtos/BannerTemplateTheme";
|
|
25
|
+
export * from "./dtos/BannerTranslation";
|
|
22
26
|
export * from "./dtos/BenefitReferenceVerificationRequest";
|
|
23
27
|
export * from "./dtos/ConnectorCatalogItem";
|
|
24
28
|
export * from "./dtos/ConnectorCatalogResponse";
|
|
@@ -32,4 +36,6 @@ export * from "./dtos/BannerContentRequest";
|
|
|
32
36
|
export * from "./dtos/BannerActionRequest";
|
|
33
37
|
export * from "./dtos/BannerCreateRequest";
|
|
34
38
|
export * from "./dtos/BannerUpdateRequest";
|
|
39
|
+
export * from "./dtos/BannerTemplateThemeRequest";
|
|
40
|
+
export * from "./dtos/BannerTemplateRequest";
|
|
35
41
|
export * from "./dtos/PublicVerifyReferenceRequest";
|
|
@@ -22,6 +22,8 @@ __exportStar(require("./enums/BannerContentTypeEnum"), exports);
|
|
|
22
22
|
__exportStar(require("./enums/BannerActionTypeEnum"), exports);
|
|
23
23
|
__exportStar(require("./enums/BannerStatusEnum"), exports);
|
|
24
24
|
__exportStar(require("./enums/BannerLocaleEnum"), exports);
|
|
25
|
+
__exportStar(require("./enums/BannerScreenEnum"), exports);
|
|
26
|
+
__exportStar(require("./enums/BannerTemplateVariantEnum"), exports);
|
|
25
27
|
//DTOs
|
|
26
28
|
__exportStar(require("./dtos/BenefitItem"), exports);
|
|
27
29
|
__exportStar(require("./dtos/BenefitListResponse"), exports);
|
|
@@ -37,6 +39,8 @@ __exportStar(require("./dtos/ServiceLeaf"), exports);
|
|
|
37
39
|
__exportStar(require("./dtos/BannerContent"), exports);
|
|
38
40
|
__exportStar(require("./dtos/BannerAction"), exports);
|
|
39
41
|
__exportStar(require("./dtos/BannerItem"), exports);
|
|
42
|
+
__exportStar(require("./dtos/BannerTemplateTheme"), exports);
|
|
43
|
+
__exportStar(require("./dtos/BannerTranslation"), exports);
|
|
40
44
|
__exportStar(require("./dtos/BenefitReferenceVerificationRequest"), exports);
|
|
41
45
|
__exportStar(require("./dtos/ConnectorCatalogItem"), exports);
|
|
42
46
|
__exportStar(require("./dtos/ConnectorCatalogResponse"), exports);
|
|
@@ -51,4 +55,6 @@ __exportStar(require("./dtos/BannerContentRequest"), exports);
|
|
|
51
55
|
__exportStar(require("./dtos/BannerActionRequest"), exports);
|
|
52
56
|
__exportStar(require("./dtos/BannerCreateRequest"), exports);
|
|
53
57
|
__exportStar(require("./dtos/BannerUpdateRequest"), exports);
|
|
58
|
+
__exportStar(require("./dtos/BannerTemplateThemeRequest"), exports);
|
|
59
|
+
__exportStar(require("./dtos/BannerTemplateRequest"), exports);
|
|
54
60
|
__exportStar(require("./dtos/PublicVerifyReferenceRequest"), exports);
|
package/package.json
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { BannerActionTypeEnum } from "../enums/BannerActionTypeEnum";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Acción pública del banner. La estructura cambia según `type`:
|
|
5
|
+
* - URL → `target` (URL externa absoluta)
|
|
6
|
+
* - NAVIGATION → `flow` y opcionalmente `props` (data dinámica para profundizar la navegación)
|
|
7
|
+
*
|
|
8
|
+
* Cuando un banner es informativo se omite el campo `action` por completo
|
|
9
|
+
* en el response — no existe un type "NONE".
|
|
10
|
+
*/
|
|
3
11
|
export class BannerAction {
|
|
4
12
|
type: BannerActionTypeEnum;
|
|
13
|
+
|
|
14
|
+
/** URL externa absoluta — solo si type === URL. */
|
|
5
15
|
target?: string;
|
|
6
|
-
|
|
16
|
+
|
|
17
|
+
/** Flow interno de la app — solo si type === NAVIGATION. */
|
|
18
|
+
flow?: string;
|
|
19
|
+
|
|
20
|
+
/** Data libre para profundizar la navegación — solo si type === NAVIGATION. */
|
|
21
|
+
props?: Record<string, unknown>;
|
|
22
|
+
|
|
23
|
+
/** Tracking arbitrario (campaign, source, etc.). */
|
|
7
24
|
metadata?: Record<string, unknown>;
|
|
8
25
|
}
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import { IsEnum, IsObject, IsOptional, IsString } from "class-validator";
|
|
2
2
|
import { BannerActionTypeEnum } from "../enums/BannerActionTypeEnum";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Acción del banner. Validación cruzada por tipo (la aplica el backend):
|
|
6
|
+
* - URL → `target` debe estar presente (URL absoluta)
|
|
7
|
+
* - NAVIGATION → `flow` debe estar presente; `props` opcional
|
|
8
|
+
*/
|
|
4
9
|
export class BannerActionRequest {
|
|
5
10
|
@IsEnum(BannerActionTypeEnum)
|
|
6
11
|
type!: BannerActionTypeEnum;
|
|
7
12
|
|
|
13
|
+
/** URL externa absoluta — requerido cuando type === URL. */
|
|
8
14
|
@IsOptional() @IsString() target?: string;
|
|
9
|
-
@IsOptional() @IsString() benefitId?: string;
|
|
10
15
|
|
|
16
|
+
/** Flow interno de la app — requerido cuando type === NAVIGATION. */
|
|
17
|
+
@IsOptional() @IsString() flow?: string;
|
|
18
|
+
|
|
19
|
+
/** Data libre para profundizar la navegación — opcional cuando type === NAVIGATION. */
|
|
20
|
+
@IsOptional()
|
|
21
|
+
@IsObject()
|
|
22
|
+
props?: Record<string, unknown>;
|
|
23
|
+
|
|
24
|
+
/** Tracking arbitrario (campaña, source, etc.). */
|
|
11
25
|
@IsOptional()
|
|
12
26
|
@IsObject()
|
|
13
27
|
metadata?: Record<string, unknown>;
|
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
import { BannerContentTypeEnum } from "../enums/BannerContentTypeEnum";
|
|
2
|
+
import { BannerTemplateVariantEnum } from "../enums/BannerTemplateVariantEnum";
|
|
3
|
+
import { BannerTemplateTheme } from "./BannerTemplateTheme";
|
|
4
|
+
import { BannerTranslation } from "./BannerTranslation";
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
* Wrapper de variant + theme para banners type === TEMPLATE.
|
|
8
|
+
*/
|
|
9
|
+
export interface BannerTemplate {
|
|
10
|
+
variant: BannerTemplateVariantEnum;
|
|
11
|
+
theme?: BannerTemplateTheme;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Contenido del banner con sus traducciones en ambos idiomas (es y en).
|
|
16
|
+
*
|
|
17
|
+
* La app elige qué locale renderizar según la preferencia del usuario —
|
|
18
|
+
* el backend NO localiza del lado servidor, devuelve los dos idiomas
|
|
19
|
+
* para que la app maneje la lógica de cambio de idioma sin re-pegarle
|
|
20
|
+
* al endpoint cada vez que el usuario cambia el setting.
|
|
7
21
|
*/
|
|
8
22
|
export class BannerContent {
|
|
9
23
|
type: BannerContentTypeEnum;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
24
|
+
|
|
25
|
+
/** Solo presente cuando type === TEMPLATE. */
|
|
26
|
+
template?: BannerTemplate;
|
|
27
|
+
|
|
28
|
+
/** Traducciones por locale. El admin garantiza que ambas estén completas para banners ACTIVE. */
|
|
29
|
+
translations: {
|
|
30
|
+
es?: BannerTranslation;
|
|
31
|
+
en?: BannerTranslation;
|
|
32
|
+
};
|
|
15
33
|
}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import { IsEnum, ValidateNested } from "class-validator";
|
|
1
|
+
import { IsEnum, IsOptional, ValidateNested } from "class-validator";
|
|
2
2
|
import { Type } from "class-transformer";
|
|
3
3
|
import { BannerContentTypeEnum } from "../enums/BannerContentTypeEnum";
|
|
4
|
+
import { BannerTemplateRequest } from "./BannerTemplateRequest";
|
|
4
5
|
import { BannerTranslationsRequest } from "./BannerTranslationsRequest";
|
|
5
6
|
|
|
6
7
|
export class BannerContentRequest {
|
|
7
8
|
@IsEnum(BannerContentTypeEnum)
|
|
8
9
|
type!: BannerContentTypeEnum;
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Solo presente cuando `type === TEMPLATE`. La validación cruzada
|
|
13
|
+
* "TEMPLATE requiere template, los demás tipos lo ignoran" la aplica
|
|
14
|
+
* el backend al persistir.
|
|
15
|
+
*/
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@ValidateNested()
|
|
18
|
+
@Type(() => BannerTemplateRequest)
|
|
19
|
+
template?: BannerTemplateRequest;
|
|
20
|
+
|
|
10
21
|
@ValidateNested()
|
|
11
22
|
@Type(() => BannerTranslationsRequest)
|
|
12
23
|
translations!: BannerTranslationsRequest;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ArrayNotEmpty,
|
|
3
|
+
IsArray,
|
|
2
4
|
IsEnum,
|
|
3
5
|
IsInt,
|
|
4
6
|
IsNotEmpty,
|
|
@@ -10,6 +12,7 @@ import {
|
|
|
10
12
|
} from "class-validator";
|
|
11
13
|
import { Type } from "class-transformer";
|
|
12
14
|
import { BannerStatusEnum } from "../enums/BannerStatusEnum";
|
|
15
|
+
import { BannerScreenEnum } from "../enums/BannerScreenEnum";
|
|
13
16
|
import { BannerContentRequest } from "./BannerContentRequest";
|
|
14
17
|
import { BannerActionRequest } from "./BannerActionRequest";
|
|
15
18
|
|
|
@@ -29,6 +32,16 @@ export class BannerCreateRequest {
|
|
|
29
32
|
@Min(0)
|
|
30
33
|
sortOrder!: number;
|
|
31
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Pantallas donde el banner aparece. Requerido — al menos un valor.
|
|
37
|
+
* El admin decide caso por caso por restricciones regulatorias (algunos
|
|
38
|
+
* benefits no se pueden promocionar en HOME).
|
|
39
|
+
*/
|
|
40
|
+
@IsArray()
|
|
41
|
+
@ArrayNotEmpty()
|
|
42
|
+
@IsEnum(BannerScreenEnum, { each: true })
|
|
43
|
+
screens!: BannerScreenEnum[];
|
|
44
|
+
|
|
32
45
|
@IsOptional() @IsInt() startDate?: number;
|
|
33
46
|
@IsOptional() @IsInt() endDate?: number;
|
|
34
47
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IsEnum, IsOptional, ValidateNested } from "class-validator";
|
|
2
|
+
import { Type } from "class-transformer";
|
|
3
|
+
import { BannerTemplateVariantEnum } from "../enums/BannerTemplateVariantEnum";
|
|
4
|
+
import { BannerTemplateThemeRequest } from "./BannerTemplateThemeRequest";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Wrapper de variant + theme para banners content.type === TEMPLATE.
|
|
8
|
+
*/
|
|
9
|
+
export class BannerTemplateRequest {
|
|
10
|
+
@IsEnum(BannerTemplateVariantEnum)
|
|
11
|
+
variant!: BannerTemplateVariantEnum;
|
|
12
|
+
|
|
13
|
+
@IsOptional()
|
|
14
|
+
@ValidateNested()
|
|
15
|
+
@Type(() => BannerTemplateThemeRequest)
|
|
16
|
+
theme?: BannerTemplateThemeRequest;
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme de un banner TEMPLATE. Todos los campos son opcionales — si vienen
|
|
3
|
+
* ausentes, el frontend aplica defaults de marca:
|
|
4
|
+
*
|
|
5
|
+
* backgroundColor: #915DE4
|
|
6
|
+
* textColor: #FFFFFF
|
|
7
|
+
* buttonBackgroundColor: #FFFF00
|
|
8
|
+
* buttonTextColor: #915DE4
|
|
9
|
+
*
|
|
10
|
+
* Los campos del botón (`buttonBackgroundColor`, `buttonTextColor`) sólo
|
|
11
|
+
* tienen efecto cuando la variante incluye un botón.
|
|
12
|
+
*/
|
|
13
|
+
export interface BannerTemplateTheme {
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
textColor?: string;
|
|
16
|
+
buttonBackgroundColor?: string;
|
|
17
|
+
buttonTextColor?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IsOptional, IsString } from "class-validator";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* DTO de entrada para el theme del banner TEMPLATE. Todos los campos
|
|
5
|
+
* opcionales — el frontend aplica defaults de marca cuando no vienen.
|
|
6
|
+
*/
|
|
7
|
+
export class BannerTemplateThemeRequest {
|
|
8
|
+
@IsOptional()
|
|
9
|
+
@IsString()
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
|
|
12
|
+
@IsOptional()
|
|
13
|
+
@IsString()
|
|
14
|
+
textColor?: string;
|
|
15
|
+
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsString()
|
|
18
|
+
buttonBackgroundColor?: string;
|
|
19
|
+
|
|
20
|
+
@IsOptional()
|
|
21
|
+
@IsString()
|
|
22
|
+
buttonTextColor?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slots de un banner por idioma. Cada `BannerContent.type` (y cada
|
|
3
|
+
* variante de TEMPLATE) usa solo un subset de los campos:
|
|
4
|
+
*
|
|
5
|
+
* - IMAGE → imageUrl
|
|
6
|
+
* - HTML → html
|
|
7
|
+
* - VIDEO → videoUrl, posterUrl?
|
|
8
|
+
* - TEMPLATE TITLE_DESCRIPTION_IMAGE → title, description, imageUrl
|
|
9
|
+
* - TEMPLATE TITLE_DESCRIPTION_IMAGE_BUTTON → title, description, imageUrl, buttonText
|
|
10
|
+
*
|
|
11
|
+
* El backend devuelve las dos traducciones (es y en); la app elige cuál
|
|
12
|
+
* mostrar según preferencia del usuario.
|
|
13
|
+
*/
|
|
14
|
+
export interface BannerTranslation {
|
|
15
|
+
imageUrl?: string;
|
|
16
|
+
html?: string;
|
|
17
|
+
videoUrl?: string;
|
|
18
|
+
posterUrl?: string;
|
|
19
|
+
title?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
buttonText?: string;
|
|
22
|
+
}
|
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
import { IsOptional, IsString } from "class-validator";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Slots por idioma. Cada `content.type` (y cada variante de TEMPLATE) usa
|
|
5
|
+
* solo un subset; el resto se ignora. La validación cruzada por
|
|
6
|
+
* (`content.type`, `template.variant`) la aplica el backend cuando el
|
|
7
|
+
* banner queda ACTIVE — verifica que ambos locales tengan los slots
|
|
8
|
+
* requeridos según el tipo y la variante.
|
|
9
|
+
*/
|
|
3
10
|
export class BannerTranslationRequest {
|
|
11
|
+
/** IMAGE (banner completo) y TEMPLATE (ilustración / mascota lateral). */
|
|
4
12
|
@IsOptional() @IsString() imageUrl?: string;
|
|
13
|
+
|
|
14
|
+
/** HTML — fragmento de markup. */
|
|
5
15
|
@IsOptional() @IsString() html?: string;
|
|
16
|
+
|
|
17
|
+
/** VIDEO — URL del video. */
|
|
18
|
+
@IsOptional() @IsString() videoUrl?: string;
|
|
19
|
+
|
|
20
|
+
/** VIDEO — frame inicial / fallback cuando el video no se puede reproducir. */
|
|
21
|
+
@IsOptional() @IsString() posterUrl?: string;
|
|
22
|
+
|
|
23
|
+
/** TEMPLATE — título visible. */
|
|
6
24
|
@IsOptional() @IsString() title?: string;
|
|
7
|
-
|
|
8
|
-
|
|
25
|
+
|
|
26
|
+
/** TEMPLATE — descripción debajo del título. */
|
|
27
|
+
@IsOptional() @IsString() description?: string;
|
|
28
|
+
|
|
29
|
+
/** TEMPLATE _BUTTON — texto del botón CTA. */
|
|
30
|
+
@IsOptional() @IsString() buttonText?: string;
|
|
9
31
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ArrayNotEmpty,
|
|
3
|
+
IsArray,
|
|
2
4
|
IsEnum,
|
|
3
5
|
IsInt,
|
|
4
6
|
IsObject,
|
|
@@ -9,13 +11,26 @@ import {
|
|
|
9
11
|
} from "class-validator";
|
|
10
12
|
import { Type } from "class-transformer";
|
|
11
13
|
import { BannerStatusEnum } from "../enums/BannerStatusEnum";
|
|
14
|
+
import { BannerScreenEnum } from "../enums/BannerScreenEnum";
|
|
12
15
|
import { BannerContentRequest } from "./BannerContentRequest";
|
|
13
16
|
import { BannerActionRequest } from "./BannerActionRequest";
|
|
14
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Patch parcial. Todos los campos son opcionales — el manager mergea con
|
|
20
|
+
* el documento existente y revalida (regla bilingüe + screens no vacío
|
|
21
|
+
* + action por type) sobre el resultado merged.
|
|
22
|
+
*/
|
|
15
23
|
export class BannerUpdateRequest {
|
|
16
24
|
@IsOptional() @IsString() name?: string;
|
|
17
25
|
@IsOptional() @IsEnum(BannerStatusEnum) status?: BannerStatusEnum;
|
|
18
26
|
@IsOptional() @IsInt() @Min(0) sortOrder?: number;
|
|
27
|
+
|
|
28
|
+
@IsOptional()
|
|
29
|
+
@IsArray()
|
|
30
|
+
@ArrayNotEmpty()
|
|
31
|
+
@IsEnum(BannerScreenEnum, { each: true })
|
|
32
|
+
screens?: BannerScreenEnum[];
|
|
33
|
+
|
|
19
34
|
@IsOptional() @IsInt() startDate?: number;
|
|
20
35
|
@IsOptional() @IsInt() endDate?: number;
|
|
21
36
|
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tipos de acción de un banner.
|
|
3
|
+
*
|
|
4
|
+
* - URL → abre una URL externa en el navegador del sistema
|
|
5
|
+
* - NAVIGATION → navegación interna basada en `flow` + `props` opcionales
|
|
6
|
+
*
|
|
7
|
+
* Cuando un banner es puramente informativo (no debe responder al tap),
|
|
8
|
+
* se omite el campo `action` por completo del documento — no existe un
|
|
9
|
+
* type "NONE".
|
|
10
|
+
*/
|
|
1
11
|
export enum BannerActionTypeEnum {
|
|
2
|
-
NAVIGATE = "NAVIGATE",
|
|
3
|
-
DEEPLINK = "DEEPLINK",
|
|
4
12
|
URL = "URL",
|
|
5
|
-
|
|
13
|
+
NAVIGATION = "NAVIGATION",
|
|
6
14
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tipos de contenido de un banner.
|
|
3
|
+
*
|
|
4
|
+
* - IMAGE → imagen estática (URL por idioma).
|
|
5
|
+
* - HTML → fragmento de markup que la app renderiza en una WebView.
|
|
6
|
+
* - VIDEO → video con autoplay/muted/loop, fallback a posterUrl si falla la reproducción.
|
|
7
|
+
* - TEMPLATE → layout pre-definido renderizado nativamente, parametrizado por variante + theme.
|
|
8
|
+
*/
|
|
1
9
|
export enum BannerContentTypeEnum {
|
|
2
10
|
IMAGE = "IMAGE",
|
|
3
11
|
HTML = "HTML",
|
|
12
|
+
VIDEO = "VIDEO",
|
|
4
13
|
TEMPLATE = "TEMPLATE",
|
|
5
14
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pantallas donde un banner puede aparecer.
|
|
3
|
+
*
|
|
4
|
+
* El admin elige una o más al crear el banner. La motivación es regulatoria:
|
|
5
|
+
* algunos benefits no se pueden promocionar en HOME y la decisión se delega
|
|
6
|
+
* caso por caso al admin.
|
|
7
|
+
*/
|
|
8
|
+
export enum BannerScreenEnum {
|
|
9
|
+
HOME = "HOME",
|
|
10
|
+
BENEFIT_CENTER = "BENEFIT_CENTER",
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variantes del banner type === "TEMPLATE".
|
|
3
|
+
*
|
|
4
|
+
* Cada variante define un layout pre-definido que la app renderiza
|
|
5
|
+
* nativamente. La elección determina qué slots de translation son
|
|
6
|
+
* requeridos y si el theme exige campos adicionales (botón, etc.).
|
|
7
|
+
*/
|
|
8
|
+
export enum BannerTemplateVariantEnum {
|
|
9
|
+
/** Card con título, descripción y arte lateral. Sin botón. */
|
|
10
|
+
TITLE_DESCRIPTION_IMAGE = "TITLE_DESCRIPTION_IMAGE",
|
|
11
|
+
|
|
12
|
+
/** Card con título, descripción, arte lateral y botón CTA destacado. */
|
|
13
|
+
TITLE_DESCRIPTION_IMAGE_BUTTON = "TITLE_DESCRIPTION_IMAGE_BUTTON",
|
|
14
|
+
}
|
|
@@ -6,6 +6,8 @@ export * from "./enums/BannerContentTypeEnum";
|
|
|
6
6
|
export * from "./enums/BannerActionTypeEnum";
|
|
7
7
|
export * from "./enums/BannerStatusEnum";
|
|
8
8
|
export * from "./enums/BannerLocaleEnum";
|
|
9
|
+
export * from "./enums/BannerScreenEnum";
|
|
10
|
+
export * from "./enums/BannerTemplateVariantEnum";
|
|
9
11
|
|
|
10
12
|
//DTOs
|
|
11
13
|
export * from "./dtos/BenefitItem";
|
|
@@ -22,6 +24,8 @@ export * from "./dtos/ServiceLeaf";
|
|
|
22
24
|
export * from "./dtos/BannerContent";
|
|
23
25
|
export * from "./dtos/BannerAction";
|
|
24
26
|
export * from "./dtos/BannerItem";
|
|
27
|
+
export * from "./dtos/BannerTemplateTheme";
|
|
28
|
+
export * from "./dtos/BannerTranslation";
|
|
25
29
|
export * from "./dtos/BenefitReferenceVerificationRequest";
|
|
26
30
|
export * from "./dtos/ConnectorCatalogItem";
|
|
27
31
|
export * from "./dtos/ConnectorCatalogResponse";
|
|
@@ -36,4 +40,6 @@ export * from "./dtos/BannerContentRequest";
|
|
|
36
40
|
export * from "./dtos/BannerActionRequest";
|
|
37
41
|
export * from "./dtos/BannerCreateRequest";
|
|
38
42
|
export * from "./dtos/BannerUpdateRequest";
|
|
43
|
+
export * from "./dtos/BannerTemplateThemeRequest";
|
|
44
|
+
export * from "./dtos/BannerTemplateRequest";
|
|
39
45
|
export * from "./dtos/PublicVerifyReferenceRequest";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare class SignUpBackofficeRequest {
|
|
2
|
-
name: string;
|
|
3
|
-
phoneNumber: string;
|
|
4
|
-
countryOfBirth: string;
|
|
5
|
-
MEX_DebitAccountWish: boolean;
|
|
6
|
-
USA_DebitAccountWish: boolean;
|
|
7
|
-
countryOfDomicile: string;
|
|
8
|
-
myReferralCode?: string;
|
|
9
|
-
referralCode?: string;
|
|
10
|
-
groupId?: string;
|
|
11
|
-
isAgent: boolean;
|
|
12
|
-
agentGroupId?: string;
|
|
13
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
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.SignUpBackofficeRequest = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class SignUpBackofficeRequest {
|
|
15
|
-
}
|
|
16
|
-
exports.SignUpBackofficeRequest = SignUpBackofficeRequest;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsString)(),
|
|
19
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
-
__metadata("design:type", String)
|
|
21
|
-
], SignUpBackofficeRequest.prototype, "name", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, class_validator_1.IsString)(),
|
|
24
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], SignUpBackofficeRequest.prototype, "phoneNumber", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_validator_1.IsString)(),
|
|
29
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], SignUpBackofficeRequest.prototype, "countryOfBirth", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, class_validator_1.IsBoolean)(),
|
|
34
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
-
__metadata("design:type", Boolean)
|
|
36
|
-
], SignUpBackofficeRequest.prototype, "MEX_DebitAccountWish", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.IsBoolean)(),
|
|
39
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
40
|
-
__metadata("design:type", Boolean)
|
|
41
|
-
], SignUpBackofficeRequest.prototype, "USA_DebitAccountWish", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, class_validator_1.IsString)(),
|
|
44
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], SignUpBackofficeRequest.prototype, "countryOfDomicile", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, class_validator_1.IsString)(),
|
|
49
|
-
(0, class_validator_1.IsOptional)(),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], SignUpBackofficeRequest.prototype, "myReferralCode", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, class_validator_1.IsString)(),
|
|
54
|
-
(0, class_validator_1.IsOptional)(),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], SignUpBackofficeRequest.prototype, "referralCode", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, class_validator_1.IsString)(),
|
|
59
|
-
(0, class_validator_1.IsOptional)(),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], SignUpBackofficeRequest.prototype, "groupId", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, class_validator_1.IsBoolean)(),
|
|
64
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
65
|
-
__metadata("design:type", Boolean)
|
|
66
|
-
], SignUpBackofficeRequest.prototype, "isAgent", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, class_validator_1.IsString)(),
|
|
69
|
-
(0, class_validator_1.IsOptional)(),
|
|
70
|
-
__metadata("design:type", String)
|
|
71
|
-
], SignUpBackofficeRequest.prototype, "agentGroupId", void 0);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CountryId } from "../../country";
|
|
2
|
-
import { ReportConceptEnum } from "../enums/ReportConceptEnum";
|
|
3
|
-
export interface GenerateReportRequest {
|
|
4
|
-
dateFrom: string;
|
|
5
|
-
dateTo: string;
|
|
6
|
-
groupId?: string;
|
|
7
|
-
currency: CountryId;
|
|
8
|
-
amountPerReferral: number;
|
|
9
|
-
concept: ReportConceptEnum;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentStatusEnum = void 0;
|
|
4
|
-
var PaymentStatusEnum;
|
|
5
|
-
(function (PaymentStatusEnum) {
|
|
6
|
-
PaymentStatusEnum["PENDING"] = "PENDING";
|
|
7
|
-
PaymentStatusEnum["PAID"] = "PAID";
|
|
8
|
-
PaymentStatusEnum["NOT_APPLICABLE"] = "NOT_APPLICABLE";
|
|
9
|
-
})(PaymentStatusEnum || (exports.PaymentStatusEnum = PaymentStatusEnum = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OfferStatusEnum } from "../enums/OfferStatusEnum";
|
|
2
|
-
import { CreditStatusEnum } from "../enums/CreditStatusEnum";
|
|
3
|
-
export declare class CreditBannerStateResponse {
|
|
4
|
-
showBanner: boolean;
|
|
5
|
-
bannerType: 'NURTURING' | 'OFFER_AVAILABLE' | 'ACTIVE_CREDIT' | 'NONE';
|
|
6
|
-
offerStatus: OfferStatusEnum | null;
|
|
7
|
-
creditStatus: CreditStatusEnum | null;
|
|
8
|
-
message: string | null;
|
|
9
|
-
maxOfferAmount: number | null;
|
|
10
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { CreditStatusEnum } from "../enums/CreditStatusEnum";
|
|
2
|
-
import { DelinquencyLevelEnum } from "../enums/DelinquencyLevelEnum";
|
|
3
|
-
import { CollectionFrequencyEnum } from "../enums/CollectionFrequencyEnum";
|
|
4
|
-
export declare class CreditDetailResponse {
|
|
5
|
-
creditId: string;
|
|
6
|
-
status: CreditStatusEnum;
|
|
7
|
-
delinquencyLevel: DelinquencyLevelEnum;
|
|
8
|
-
originalAmount: number;
|
|
9
|
-
currentBalance: number;
|
|
10
|
-
paidAmount: number;
|
|
11
|
-
nextPaymentAmount: number;
|
|
12
|
-
nextPaymentDate: string;
|
|
13
|
-
overdueDays: number;
|
|
14
|
-
overdueAmount: number;
|
|
15
|
-
termWeeks: number;
|
|
16
|
-
currentWeek: number;
|
|
17
|
-
frequency: CollectionFrequencyEnum;
|
|
18
|
-
annualInterestRate: number;
|
|
19
|
-
cat: number;
|
|
20
|
-
disbursementDate: string;
|
|
21
|
-
maturityDate: string;
|
|
22
|
-
contractDocumentId: string;
|
|
23
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OfferStatusEnum } from "../enums/OfferStatusEnum";
|
|
2
|
-
export declare class CreditEligibilityResponse {
|
|
3
|
-
eligible: boolean;
|
|
4
|
-
status: OfferStatusEnum;
|
|
5
|
-
maxAmount: number | null;
|
|
6
|
-
minAmount: number | null;
|
|
7
|
-
reason: string | null;
|
|
8
|
-
expiresAt: string | null;
|
|
9
|
-
}
|