Skip to content

Commit

Permalink
fix: update invite user by email option type (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks authored Sep 2, 2024
1 parent 536ad2c commit 2510230
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions supabase_auth/_async/gotrue_admin_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
AuthMFAAdminListFactorsResponse,
GenerateLinkParams,
GenerateLinkResponse,
Options,
InviteUserByEmailOptions,
SignOutScope,
User,
UserResponse,
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions supabase_auth/_sync/gotrue_admin_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
AuthMFAAdminListFactorsResponse,
GenerateLinkParams,
GenerateLinkResponse,
Options,
InviteUserByEmailOptions,
SignOutScope,
User,
UserResponse,
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions supabase_auth/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2510230

Please sign in to comment.