From 6dde131609551621eba102d71c5897a350d7ce64 Mon Sep 17 00:00:00 2001 From: Jon Koops Date: Sat, 13 Jun 2020 16:31:08 +0200 Subject: [PATCH] KEYCLOAK-13739 Add missing type definition for register options --- adapters/oidc/js/src/main/resources/keycloak.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/adapters/oidc/js/src/main/resources/keycloak.d.ts b/adapters/oidc/js/src/main/resources/keycloak.d.ts index 884ab5ca13..4c544767cd 100644 --- a/adapters/oidc/js/src/main/resources/keycloak.d.ts +++ b/adapters/oidc/js/src/main/resources/keycloak.d.ts @@ -215,6 +215,8 @@ declare namespace Keycloak { redirectUri?: string; } + interface KeycloakRegisterOptions extends Omit { } + type KeycloakPromiseCallback = (result: T) => void; class KeycloakPromise extends Promise { @@ -241,7 +243,7 @@ declare namespace Keycloak { interface KeycloakAdapter { login(options?: KeycloakLoginOptions): KeycloakPromise; logout(options?: KeycloakLogoutOptions): KeycloakPromise; - register(options?: KeycloakLoginOptions): KeycloakPromise; + register(options?: KeycloakRegisterOptions): KeycloakPromise; accountManagement(): KeycloakPromise; redirectUri(options: { redirectUri: string; }, encodeHash: boolean): string; } @@ -466,10 +468,9 @@ declare namespace Keycloak { /** * Redirects to registration form. - * @param options Supports same options as Keycloak#login but `action` is - * set to `'register'`. + * @param options The options used for the registration. */ - register(options?: any): KeycloakPromise; + register(options?: KeycloakRegisterOptions): KeycloakPromise; /** * Redirects to the Account Management Console. @@ -490,10 +491,9 @@ declare namespace Keycloak { /** * Returns the URL to registration page. - * @param options Supports same options as Keycloak#createLoginUrl but - * `action` is set to `'register'`. + * @param options The options used for creating the registration URL. */ - createRegisterUrl(options?: KeycloakLoginOptions): string; + createRegisterUrl(options?: KeycloakRegisterOptions): string; /** * Returns the URL to the Account Management Console.