feat(users): Incorporate themes in user APIs (#6772)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Mani Chandra
2024-12-16 14:23:31 +05:30
committed by GitHub
parent da46427614
commit 4b989fe0fb
27 changed files with 687 additions and 89 deletions

View File

@ -150,6 +150,7 @@ pub struct GetUserDetailsResponse {
pub recovery_codes_left: Option<usize>,
pub profile_id: id_type::ProfileId,
pub entity_type: EntityType,
pub theme_id: Option<String>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize)]
@ -345,8 +346,9 @@ pub struct SsoSignInRequest {
}
#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct AuthIdQueryParam {
pub struct AuthIdAndThemeIdQueryParam {
pub auth_id: Option<String>,
pub theme_id: Option<String>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize)]

View File

@ -1,6 +1,9 @@
use actix_multipart::form::{bytes::Bytes, text::Text, MultipartForm};
use common_enums::EntityType;
use common_utils::{id_type, types::theme::ThemeLineage};
use common_utils::{
id_type,
types::theme::{EmailThemeConfig, ThemeLineage},
};
use masking::Secret;
use serde::{Deserialize, Serialize};
@ -13,6 +16,7 @@ pub struct GetThemeResponse {
pub org_id: Option<id_type::OrganizationId>,
pub merchant_id: Option<id_type::MerchantId>,
pub profile_id: Option<id_type::ProfileId>,
pub email_config: EmailThemeConfig,
pub theme_data: ThemeData,
}
@ -35,12 +39,14 @@ pub struct CreateThemeRequest {
pub lineage: ThemeLineage,
pub theme_name: String,
pub theme_data: ThemeData,
pub email_config: Option<EmailThemeConfig>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UpdateThemeRequest {
pub lineage: ThemeLineage,
pub theme_data: ThemeData,
// TODO: Add support to update email config
}
// All the below structs are for the theme.json file,