From e18b6ac43039d9d28abb5636a849748f8a6da1d1 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Fri, 30 Aug 2024 16:57:15 +0000 Subject: [PATCH] fix: update invite users by id option type --- supabase_auth/_async/gotrue_admin_api.py | 4 ++-- supabase_auth/_sync/gotrue_admin_api.py | 4 ++-- supabase_auth/types.py | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/supabase_auth/_async/gotrue_admin_api.py b/supabase_auth/_async/gotrue_admin_api.py index b4a2b441..24f64bd0 100644 --- a/supabase_auth/_async/gotrue_admin_api.py +++ b/supabase_auth/_async/gotrue_admin_api.py @@ -13,7 +13,7 @@ AuthMFAAdminListFactorsResponse, GenerateLinkParams, GenerateLinkResponse, - Options, + InviteUserByEmailOptions, SignOutScope, User, UserResponse, @@ -57,7 +57,7 @@ async def sign_out(self, jwt: str, scope: SignOutScope = "global") -> None: async def invite_user_by_email( self, email: str, - options: Options = {}, + options: InviteUserByEmailOptions = {}, ) -> UserResponse: """ Sends an invite link to an email address. diff --git a/supabase_auth/_sync/gotrue_admin_api.py b/supabase_auth/_sync/gotrue_admin_api.py index 800444e0..c4ae6b99 100644 --- a/supabase_auth/_sync/gotrue_admin_api.py +++ b/supabase_auth/_sync/gotrue_admin_api.py @@ -13,7 +13,7 @@ AuthMFAAdminListFactorsResponse, GenerateLinkParams, GenerateLinkResponse, - Options, + InviteUserByEmailOptions, SignOutScope, User, UserResponse, @@ -57,7 +57,7 @@ def sign_out(self, jwt: str, scope: SignOutScope = "global") -> None: def invite_user_by_email( self, email: str, - options: Options = {}, + options: InviteUserByEmailOptions = {}, ) -> UserResponse: """ Sends an invite link to an email address. diff --git a/supabase_auth/types.py b/supabase_auth/types.py index 5db169b0..53b0fe00 100644 --- a/supabase_auth/types.py +++ b/supabase_auth/types.py @@ -87,6 +87,11 @@ class Options(TypedDict): captcha_token: NotRequired[str] +class InviteUserByEmailOptions(TypedDict): + redirect_to: NotRequired[str] + data: NotRequired[Any] + + class AuthResponse(BaseModel): user: Union[User, None] = None session: Union[Session, None] = None