@fiado/type-kit 3.7.1 → 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/BannerContent.d.ts +11 -21
- package/bin/benefitCenter/dtos/BannerContent.js +5 -7
- package/bin/benefitCenter/dtos/BannerTranslation.d.ts +22 -0
- package/bin/benefitCenter/dtos/BannerTranslation.js +2 -0
- package/bin/benefitCenter/index.d.ts +1 -0
- package/bin/benefitCenter/index.js +1 -0
- package/package.json +1 -1
- package/src/benefitCenter/dtos/BannerContent.ts +11 -27
- package/src/benefitCenter/dtos/BannerTranslation.ts +22 -0
- package/src/benefitCenter/index.ts +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BannerContentTypeEnum } from "../enums/BannerContentTypeEnum";
|
|
2
2
|
import { BannerTemplateVariantEnum } from "../enums/BannerTemplateVariantEnum";
|
|
3
3
|
import { BannerTemplateTheme } from "./BannerTemplateTheme";
|
|
4
|
+
import { BannerTranslation } from "./BannerTranslation";
|
|
4
5
|
/**
|
|
5
6
|
* Wrapper de variant + theme para banners type === TEMPLATE.
|
|
6
7
|
*/
|
|
@@ -9,31 +10,20 @@ export interface BannerTemplate {
|
|
|
9
10
|
theme?: BannerTemplateTheme;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
|
-
* Contenido del banner
|
|
13
|
-
* El backend resuelve `translations[locale]` antes de devolverlo a la app.
|
|
13
|
+
* Contenido del banner con sus traducciones en ambos idiomas (es y en).
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* - TEMPLATE → template (variant + theme), title, description, imageUrl, buttonText?
|
|
15
|
+
* La app elige qué locale renderizar según la preferencia del usuario —
|
|
16
|
+
* el backend NO localiza del lado servidor, devuelve los dos idiomas
|
|
17
|
+
* para que la app maneje la lógica de cambio de idioma sin re-pegarle
|
|
18
|
+
* al endpoint cada vez que el usuario cambia el setting.
|
|
20
19
|
*/
|
|
21
20
|
export declare class BannerContent {
|
|
22
21
|
type: BannerContentTypeEnum;
|
|
23
22
|
/** Solo presente cuando type === TEMPLATE. */
|
|
24
23
|
template?: BannerTemplate;
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
videoUrl?: string;
|
|
31
|
-
/** VIDEO — frame inicial / fallback cuando el video no se puede reproducir. */
|
|
32
|
-
posterUrl?: string;
|
|
33
|
-
/** TEMPLATE — título visible. */
|
|
34
|
-
title?: string;
|
|
35
|
-
/** TEMPLATE — descripción debajo del título. */
|
|
36
|
-
description?: string;
|
|
37
|
-
/** TEMPLATE _BUTTON — texto del botón CTA. */
|
|
38
|
-
buttonText?: string;
|
|
24
|
+
/** Traducciones por locale. El admin garantiza que ambas estén completas para banners ACTIVE. */
|
|
25
|
+
translations: {
|
|
26
|
+
es?: BannerTranslation;
|
|
27
|
+
en?: BannerTranslation;
|
|
28
|
+
};
|
|
39
29
|
}
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BannerContent = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Contenido del banner
|
|
6
|
-
* El backend resuelve `translations[locale]` antes de devolverlo a la app.
|
|
5
|
+
* Contenido del banner con sus traducciones en ambos idiomas (es y en).
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* - TEMPLATE → template (variant + theme), title, description, imageUrl, buttonText?
|
|
7
|
+
* La app elige qué locale renderizar según la preferencia del usuario —
|
|
8
|
+
* el backend NO localiza del lado servidor, devuelve los dos idiomas
|
|
9
|
+
* para que la app maneje la lógica de cambio de idioma sin re-pegarle
|
|
10
|
+
* al endpoint cada vez que el usuario cambia el setting.
|
|
13
11
|
*/
|
|
14
12
|
class BannerContent {
|
|
15
13
|
}
|
|
@@ -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
|
+
}
|
|
@@ -22,6 +22,7 @@ export * from "./dtos/BannerContent";
|
|
|
22
22
|
export * from "./dtos/BannerAction";
|
|
23
23
|
export * from "./dtos/BannerItem";
|
|
24
24
|
export * from "./dtos/BannerTemplateTheme";
|
|
25
|
+
export * from "./dtos/BannerTranslation";
|
|
25
26
|
export * from "./dtos/BenefitReferenceVerificationRequest";
|
|
26
27
|
export * from "./dtos/ConnectorCatalogItem";
|
|
27
28
|
export * from "./dtos/ConnectorCatalogResponse";
|
|
@@ -40,6 +40,7 @@ __exportStar(require("./dtos/BannerContent"), exports);
|
|
|
40
40
|
__exportStar(require("./dtos/BannerAction"), exports);
|
|
41
41
|
__exportStar(require("./dtos/BannerItem"), exports);
|
|
42
42
|
__exportStar(require("./dtos/BannerTemplateTheme"), exports);
|
|
43
|
+
__exportStar(require("./dtos/BannerTranslation"), exports);
|
|
43
44
|
__exportStar(require("./dtos/BenefitReferenceVerificationRequest"), exports);
|
|
44
45
|
__exportStar(require("./dtos/ConnectorCatalogItem"), exports);
|
|
45
46
|
__exportStar(require("./dtos/ConnectorCatalogResponse"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BannerContentTypeEnum } from "../enums/BannerContentTypeEnum";
|
|
2
2
|
import { BannerTemplateVariantEnum } from "../enums/BannerTemplateVariantEnum";
|
|
3
3
|
import { BannerTemplateTheme } from "./BannerTemplateTheme";
|
|
4
|
+
import { BannerTranslation } from "./BannerTranslation";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Wrapper de variant + theme para banners type === TEMPLATE.
|
|
@@ -11,14 +12,12 @@ export interface BannerTemplate {
|
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
* Contenido del banner
|
|
15
|
-
* El backend resuelve `translations[locale]` antes de devolverlo a la app.
|
|
15
|
+
* Contenido del banner con sus traducciones en ambos idiomas (es y en).
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* - TEMPLATE → template (variant + theme), title, description, imageUrl, buttonText?
|
|
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.
|
|
22
21
|
*/
|
|
23
22
|
export class BannerContent {
|
|
24
23
|
type: BannerContentTypeEnum;
|
|
@@ -26,24 +25,9 @@ export class BannerContent {
|
|
|
26
25
|
/** Solo presente cuando type === TEMPLATE. */
|
|
27
26
|
template?: BannerTemplate;
|
|
28
27
|
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/** VIDEO — URL del video. */
|
|
36
|
-
videoUrl?: string;
|
|
37
|
-
|
|
38
|
-
/** VIDEO — frame inicial / fallback cuando el video no se puede reproducir. */
|
|
39
|
-
posterUrl?: string;
|
|
40
|
-
|
|
41
|
-
/** TEMPLATE — título visible. */
|
|
42
|
-
title?: string;
|
|
43
|
-
|
|
44
|
-
/** TEMPLATE — descripción debajo del título. */
|
|
45
|
-
description?: string;
|
|
46
|
-
|
|
47
|
-
/** TEMPLATE _BUTTON — texto del botón CTA. */
|
|
48
|
-
buttonText?: string;
|
|
28
|
+
/** Traducciones por locale. El admin garantiza que ambas estén completas para banners ACTIVE. */
|
|
29
|
+
translations: {
|
|
30
|
+
es?: BannerTranslation;
|
|
31
|
+
en?: BannerTranslation;
|
|
32
|
+
};
|
|
49
33
|
}
|
|
@@ -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
|
+
}
|
|
@@ -25,6 +25,7 @@ export * from "./dtos/BannerContent";
|
|
|
25
25
|
export * from "./dtos/BannerAction";
|
|
26
26
|
export * from "./dtos/BannerItem";
|
|
27
27
|
export * from "./dtos/BannerTemplateTheme";
|
|
28
|
+
export * from "./dtos/BannerTranslation";
|
|
28
29
|
export * from "./dtos/BenefitReferenceVerificationRequest";
|
|
29
30
|
export * from "./dtos/ConnectorCatalogItem";
|
|
30
31
|
export * from "./dtos/ConnectorCatalogResponse";
|