mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 20:23:43 +08:00
refactor(users): Deprecate unused user APIs and stabilize v1 APIs (#6114)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use std::fmt::Debug;
|
||||
|
||||
use common_enums::{EntityType, PermissionGroup, RoleScope, TokenPurpose};
|
||||
use common_enums::{EntityType, TokenPurpose};
|
||||
use common_utils::{crypto::OptionalEncryptableName, id_type, pii};
|
||||
use masking::Secret;
|
||||
|
||||
@ -25,19 +25,6 @@ pub struct SignUpRequest {
|
||||
pub password: Secret<String>,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, Debug, Clone)]
|
||||
pub struct DashboardEntryResponse {
|
||||
pub token: Secret<String>,
|
||||
pub merchant_id: id_type::MerchantId,
|
||||
pub name: Secret<String>,
|
||||
pub email: pii::Email,
|
||||
pub verification_days_left: Option<i64>,
|
||||
pub user_role: String,
|
||||
//this field is added for audit/debug reasons
|
||||
#[serde(skip_serializing)]
|
||||
pub user_id: String,
|
||||
}
|
||||
|
||||
pub type SignInRequest = SignUpRequest;
|
||||
|
||||
#[derive(serde::Deserialize, Debug, Clone, serde::Serialize)]
|
||||
@ -131,20 +118,6 @@ pub struct UserMerchantCreate {
|
||||
pub company_name: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
pub struct ListUsersResponse(pub Vec<UserDetails>);
|
||||
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
pub struct UserDetails {
|
||||
pub email: pii::Email,
|
||||
pub name: Secret<String>,
|
||||
pub role_id: String,
|
||||
pub role_name: String,
|
||||
pub status: UserStatus,
|
||||
#[serde(with = "common_utils::custom_serde::iso8601")]
|
||||
pub last_modified_at: time::PrimitiveDateTime,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, Debug, Clone)]
|
||||
pub struct GetUserDetailsResponse {
|
||||
pub merchant_id: id_type::MerchantId,
|
||||
@ -167,19 +140,6 @@ pub struct GetUserRoleDetailsRequest {
|
||||
pub email: pii::Email,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
pub struct GetUserRoleDetailsResponse {
|
||||
pub email: pii::Email,
|
||||
pub name: Secret<String>,
|
||||
pub role_id: String,
|
||||
pub role_name: String,
|
||||
pub status: UserStatus,
|
||||
#[serde(with = "common_utils::custom_serde::iso8601")]
|
||||
pub last_modified_at: time::PrimitiveDateTime,
|
||||
pub groups: Vec<PermissionGroup>,
|
||||
pub role_scope: RoleScope,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
pub struct GetUserRoleDetailsResponseV2 {
|
||||
pub role_id: String,
|
||||
@ -207,16 +167,6 @@ pub struct SendVerifyEmailRequest {
|
||||
pub email: pii::Email,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
pub struct UserMerchantAccount {
|
||||
pub merchant_id: id_type::MerchantId,
|
||||
pub merchant_name: OptionalEncryptableName,
|
||||
pub is_active: bool,
|
||||
pub role_id: String,
|
||||
pub role_name: String,
|
||||
pub org_id: id_type::OrganizationId,
|
||||
}
|
||||
|
||||
#[cfg(feature = "recon")]
|
||||
#[derive(serde::Serialize, Debug)]
|
||||
pub struct VerifyTokenResponse {
|
||||
|
||||
Reference in New Issue
Block a user