Add themeVersion in KcContext type

This commit is contained in:
Joseph Garrone 2023-11-22 18:00:29 +01:00
parent bb007ddce5
commit e1afc1cf7a
4 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@ export type KcContext = KcContext.Password | KcContext.Account;
export declare namespace KcContext { export declare namespace KcContext {
export type Common = { export type Common = {
themeVersion: string;
keycloakifyVersion: string; keycloakifyVersion: string;
themeType: "account"; themeType: "account";
themeName: string; themeName: string;

View File

@ -7,6 +7,7 @@ import type { KcContext } from "./KcContext";
const PUBLIC_URL = (typeof process !== "object" ? undefined : process.env?.["PUBLIC_URL"]) || "/"; const PUBLIC_URL = (typeof process !== "object" ? undefined : process.env?.["PUBLIC_URL"]) || "/";
export const kcContextCommonMock: KcContext.Common = { export const kcContextCommonMock: KcContext.Common = {
"themeVersion": "0.0.0",
"keycloakifyVersion": "0.0.0", "keycloakifyVersion": "0.0.0",
"themeType": "account", "themeType": "account",
"themeName": "my-theme-name", "themeName": "my-theme-name",

View File

@ -39,6 +39,7 @@ export type KcContext =
export declare namespace KcContext { export declare namespace KcContext {
export type Common = { export type Common = {
themeVersion: string;
keycloakifyVersion: string; keycloakifyVersion: string;
themeType: "login"; themeType: "login";
themeName: string; themeName: string;

View File

@ -103,6 +103,7 @@ const attributes: Attribute[] = [
const attributesByName = Object.fromEntries(attributes.map(attribute => [attribute.name, attribute])) as any; const attributesByName = Object.fromEntries(attributes.map(attribute => [attribute.name, attribute])) as any;
export const kcContextCommonMock: KcContext.Common = { export const kcContextCommonMock: KcContext.Common = {
"themeVersion": "0.0.0",
"keycloakifyVersion": "0.0.0", "keycloakifyVersion": "0.0.0",
"themeType": "login", "themeType": "login",
"themeName": "my-theme-name", "themeName": "my-theme-name",