feat: create key in encryption service for merchant and user (#4910)

Co-authored-by: Arjun Karthik <m.arjunkarthik@gmail.com>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Kartikeya Hegde
2024-07-11 20:39:40 +05:30
committed by GitHub
parent f63a678d71
commit 43741df4a7
35 changed files with 668 additions and 7 deletions

View File

@ -994,6 +994,12 @@ pub struct ToggleKVResponse {
pub kv_enabled: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
pub struct TransferKeyResponse {
/// The identifier for the Merchant Account
#[schema(example = 32)]
pub total_transferred: usize,
}
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
pub struct ToggleKVRequest {
#[serde(skip_deserializing)]

View File

@ -80,6 +80,7 @@ impl_misc_api_event_type!(
ToggleKVRequest,
ToggleAllKVRequest,
ToggleAllKVResponse,
TransferKeyResponse,
MerchantAccountDeleteResponse,
MerchantAccountUpdate,
CardInfoResponse,

View File

@ -20,7 +20,7 @@ use crate::user::{
SsoSignInRequest, SwitchMerchantIdRequest, TokenOrPayloadResponse, TokenResponse,
TwoFactorAuthStatusResponse, UpdateUserAccountDetailsRequest,
UpdateUserAuthenticationMethodRequest, UserFromEmailRequest, UserMerchantCreate,
VerifyEmailRequest, VerifyRecoveryCodeRequest, VerifyTotpRequest,
UserTransferKeyResponse, VerifyEmailRequest, VerifyRecoveryCodeRequest, VerifyTotpRequest,
};
impl ApiEventMetric for DashboardEntryResponse {
@ -85,6 +85,7 @@ common_utils::impl_misc_api_event_type!(
UpdateUserAuthenticationMethodRequest,
GetSsoAuthUrlRequest,
SsoSignInRequest,
UserTransferKeyResponse,
AuthSelectRequest
);

View File

@ -379,3 +379,8 @@ pub struct AuthIdQueryParam {
pub struct AuthSelectRequest {
pub id: Option<String>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct UserTransferKeyResponse {
pub total_transferred: usize,
}