from __future__ import annotations

import urllib.parse
from typing import Any, Dict, Optional

from ..client import Client

class UsersAuthResource:
    def __init__(self, client: Client) -> None:
        self._client = client

    def sendOtp(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/users/sendOtp", query=query, body=body)

    def resetPassword(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/users/resetPassword", query=query, body=body)

    def verifyOtp(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/users/verify-otp", query=query, body=body)

    def resendOtp(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/users/resend-otp", query=query, body=body)

    def login(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/users/login", query=query, body=body)

    def loginEmail(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/users/login/email", query=query, body=body)
