package auth

type (
	User struct {
		Email       string
		Password    string
		FirstName   string
		SecondName  string
		Patronymic  *string
		Number      string
		Permissions map[string]string
	}

	RegisterUserRequest struct {
		User     User
		UserType int32
	}

	RegisterUserResponse struct {
		UserId string
	}
)

type (
	LoginUserRequest struct {
		Email    string
		Password string
	}

	LoginUserResponse struct {
		UserId       string `json:"user_id"`
		AccessToken  string `json:"access_token"`
		RefreshToken string `json:"refresh_token"`
	}
)

type (
	GetUserTokenResponse struct {
		AccessToken string `json:"access_token"`
	}
)

type (
	LogoutUserRequest struct {
		RefreshToken string
	}
)

type (
	GetNewAccessTokenRequest struct {
		RefreshToken string
	}

	GetNewAccessTokenResponse struct {
		AccessToken  string `json:"access_token"`
		RefreshToken string `json:"refresh_token"`
	}
)

type (
	UserInfoFromToken struct {
		UserId string
	}
)

type (
	GetPermissionsByUsersIdResponse struct {
		Balance     string
		Company     string
		Employees   string
		Profile     string
		Submissions string
		Vacancies   string
	}
)
type (
	CheckPermissionsRequest struct {
		UserId                  string
		RequiredPermission      string
		RequiredPermissionLevel string
	}
)

type (
	ResetPasswordRequest struct {
		Email       string
		NewPassword string
	}
)

type (
	UserInfo struct {
		Email       string
		FirstName   string
		SecondName  string
		Patronymic  *string
		Permissions map[string]string
		UserType    int32
	}
)

type GetEmailVerificationResponse struct {
	EmailVerified bool `json:"email_verified"`
}
