From 23dded7580c42504f661fd9a7385010e96e5fecc Mon Sep 17 00:00:00 2001 From: Abdelrahman Zaki Date: Wed, 8 Oct 2025 18:27:25 +0300 Subject: [PATCH 1/2] fix(types): support organizations {id,name}[] in getClaim --- lib/utils/token/getClaim.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/token/getClaim.ts b/lib/utils/token/getClaim.ts index 28a6204..ecf0ca0 100644 --- a/lib/utils/token/getClaim.ts +++ b/lib/utils/token/getClaim.ts @@ -5,9 +5,9 @@ import { getClaims } from "./getClaims"; * * @param keyName key to get from the token * @param {("accessToken"|"idToken")} [tokenType="accessToken"] - Type of token to get claims from - * @returns { Promise } + * @returns { Promise } */ -export const getClaim = async ( +export const getClaim = async ( keyName: keyof T, tokenType: "accessToken" | "idToken" = "accessToken", ): Promise<{ From 5c39281cd1e674daa2c5e799ceb220de2329b0be Mon Sep 17 00:00:00 2001 From: Abdelrahman Zaki <133301076+abdelrahman-zaki@users.noreply.github.com> Date: Mon, 27 Oct 2025 18:58:38 +0300 Subject: [PATCH 2/2] Apply suggestion from @coderabbitai[bot] Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- lib/utils/token/getClaim.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/token/getClaim.ts b/lib/utils/token/getClaim.ts index ecf0ca0..9ccd418 100644 --- a/lib/utils/token/getClaim.ts +++ b/lib/utils/token/getClaim.ts @@ -5,7 +5,7 @@ import { getClaims } from "./getClaims"; * * @param keyName key to get from the token * @param {("accessToken"|"idToken")} [tokenType="accessToken"] - Type of token to get claims from - * @returns { Promise } + * @returns { Promise<{ name: keyof T; value: string | number | string[] | { id: string; name: string }[] } | null> } */ export const getClaim = async ( keyName: keyof T,