Add generic type for kcContext.properties

This commit is contained in:
Joseph Garrone 2024-03-02 08:52:33 +01:00
parent a2b167e120
commit 1bb0c9dfc2
4 changed files with 6 additions and 2 deletions

View File

@ -90,6 +90,7 @@ export declare namespace KcContext {
lastName?: string; lastName?: string;
username?: string; username?: string;
}; };
properties: Record<string, string | undefined>;
}; };
export type Password = Common & { export type Password = Common & {

View File

@ -145,7 +145,8 @@ export const kcContextCommonMock: KcContext.Common = {
"lastName": "doe", "lastName": "doe",
"email": "john.doe@code.gouv.fr", "email": "john.doe@code.gouv.fr",
"username": "doe_j" "username": "doe_j"
} },
"properties": {}
}; };
export const kcContextMocks: KcContext[] = [ export const kcContextMocks: KcContext[] = [

View File

@ -116,6 +116,7 @@ export declare namespace KcContext {
*/ */
exists: (fieldName: string) => boolean; exists: (fieldName: string) => boolean;
}; };
properties: Record<string, string | undefined>;
}; };
export type SamlPostForm = Common & { export type SamlPostForm = Common & {

View File

@ -236,7 +236,8 @@ export const kcContextCommonMock: KcContext.Common = {
"attributes": {} "attributes": {}
}, },
"scripts": [], "scripts": [],
"isAppInitiatedAction": false "isAppInitiatedAction": false,
"properties": {}
}; };
const loginUrl = { const loginUrl = {