text stringlengths 70 351k | source stringclasses 4
values |
|---|---|
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{sel... | ast_fragments |
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use crate::{
consts,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{sel... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org,... | ast_fragments |
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use error_stack::{report, ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use crate::... | ast_fragments |
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use crate::{
consts,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use router_env::env;
use crate::{
consts,
core::{
admin,
errors::{UserErr... | ast_fragments |
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
type InviteeUserRequestWithInvitedUserToken = (user_api::InviteUserRequest, UserFromToken);
type UserMerchantCreateRequestWithTo... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanag... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_enums::EntityType;
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{sel... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use crate::{
consts,
core::{
admin,
errors::{UserErrors, UserResult},
},
db::GlobalStorageInterface,
routes::SessionState,
services::{self, authentication::UserFromToken},
types::{domai... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use std::{
collections::HashSet,
ops::{Deref, Not},
str::FromStr,
};
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use diesel_models::{
enums::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use crate::{
consts,
core::{
admin,
errors::{UserErrors, UserResult},
},
db::GlobalStorageInterface,
routes::SessionState,
services::{self, authentication::UserFromToken},
types::{domai... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanag... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use crate::{
consts,
core::{
admin,
errors::{UserErrors, UserResult},
},
db::Glob... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use crate::{
consts,
core::{
admin,
errors::{UserErrors, UserResult},
},
db::Glob... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
type UserMe... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanag... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use crate::{
consts,
core::{
admin,
errors::{UserErrors, UserResult},
},
db::Glob... | ast_fragments |
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use crate::{
consts,
core::{
admin,
errors::{UserErrors, UserResult},
},
db::GlobalStorageInterf... | ast_fragments |
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},
user as storage_user,
user_role::{UserRole, UserRoleNew},
};
use masking... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use masking::{ExposeInterface, PeekInterface, Secret};
use crate::{
consts,
core::{
admin,
errors::{UserErrors, UserResult},
},
db::GlobalStorageInterface,
routes::SessionState,
services::{... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
fn try_from(value: pii::Email) -> Result<Self, Self::Error> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use std::{
collections::HashSet,
ops::{Deref, Not},
str::FromStr,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org, Organization, OrganizationBridge},... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{sel... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{sel... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{sel... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use crate::{
consts,
core::{
admin,
errors::{UserErrors, UserResult},
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
pub struct UserEmail(pii::Email);
static BLOCKED_EMAIL: Lazy<HashSet<String>> = Lazy::new(|| {
let blocked_emails_content = include_str!("../../utils/user/blocker_emails.txt");
let blocked_emails: HashSet<String> = block... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use common_utils::{
crypto::Encryptable, id_type, new_type::MerchantName, pii, type_name,
types::keymanager::Identifier,
};
use masking::{ExposeInterface, PeekInterface, Secret};
use crate::{
consts,
core::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user.rs | crate: router
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use diesel_models::{
enums::{TotpStatus, UserRoleVersion, UserStatus},
organization::{self as diesel_org,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/dashboard_metadata.rs | crate: router
fn from(value: &MetaData) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/dashboard_metadata.rs | crate: router
fn from(value: &MetaData) -> Self {
{
MetaData::ProductionAgreement(_) => Self::ProductionAgreement,<|fim_suffix|>
<|fim_middle|>
MetaData::ReconStatus(_) => Self::ReconStatus,
}
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use diesel_models::{enums::UserStatus, user_role::UserRole};
use masking::Secret;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use diesel_models::{enums::UserStatus, user_role::UserRole};
use masking::Secret;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
fn get_flows(&self) -> &'static [UserFlow] {
{
Self::SignInWithSSO => &SIGNIN_WITH_SSO_FLOW,<|fim_suffix|>
<|fim_middle|>
Self::ResetPassword => &RESET_PASSWORD_FLOW,
}
} | ast_fragments |
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
fn from(value: JWTFlow) -> Self {
Self::JWTFlow(value)
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
fn from(value: SPTFlow) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
fn from(value: JWTFlow) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
fn from(value: UserFlow) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use super::UserFromStorage;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState,
services::authentication as auth,
utils,
};
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use diesel_models::{enums::UserStatus, user_role::UserRole};
use masking::Secret;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
pub fn get_flow(&self) -> UserFlow {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use super::UserFromStorage;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState,
services::authentication as auth,
utils,
};
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use super::UserFromStorage;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState,
services::authentication as auth,
utils,
};
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState,
services::authentication as auth,
utils,
};
pub fn new(
token: a... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
fn get_flows(&self) -> &'static [UserFlow] {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use diesel_models::{enums::UserStatus, user_role::UserRole};
use masking::Secret;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use super::UserFromStorage;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState,
services::authentication as auth,
utils,
};
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use masking::Secret;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::SessionState,
services::authentication as auth,
utils,
};
pub asy... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types/domain/user/decision_manager.rs | crate: router
use common_enums::TokenPurpose;
use common_utils::id_type;
use super::UserFromStorage;
use crate::{
core::errors::{UserErrors, UserResult},
db::user_role::ListUserRolesByUserIdPayload,
routes::Session... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/outgoing_webhook_retry.rs | crate: router
use api_models::{
enums::EventType,
webhook_events::OutgoingWebhookRequestContent,
webhooks::{OutgoingWebhook, OutgoingWebhookContent},
};
use common_utils::{
consts::DEFAULT_LOCALE,
ext_traits:... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/outgoing_webhook_retry.rs | crate: router
use common_utils::{
consts::DEFAULT_LOCALE,
ext_traits::{StringExt, ValueExt},
};
use diesel_models::process_tracker::business_status;
use crate::core::payouts;
use crate::{
core::{
payments,
... | ast_fragments |
// file: hyperswitch/crates/router/src/workflows/outgoing_webhook_retry.rs | crate: router
use common_utils::{
consts::DEFAULT_LOCALE,
ext_traits::{StringExt, ValueExt},
};
use diesel_models::process_tracker::business_status;
use crate::core::payouts;
use crate::{
core::{
payments,
webhooks:... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/outgoing_webhook_retry.rs | crate: router
use router_env::tracing::{self, instrument};
use scheduler::{
consumer::{self, workflows::ProcessTrackerWorkflow},
types::process_data,
utils as scheduler_utils,
};
use crate::{
core::{
paym... | ast_fragments |
// file: hyperswitch/crates/router/src/workflows/outgoing_webhook_retry.rs | crate: router
use router_env::tracing::{self, instrument};
use scheduler::{
consumer::{self, workflows::ProcessTrackerWorkflow},
types::process_data,
utils as scheduler_utils,
};
use crate::{
core::{
payments,
w... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/outgoing_webhook_retry.rs | crate: router
use api_models::payouts as payout_models;
use api_models::{
enums::EventType,
webhook_events::OutgoingWebhookRequestContent,
webhooks::{OutgoingWebhook, OutgoingWebhookContent},
};
use common_utils::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/payment_sync.rs | crate: router
/// "frequency": [300],
/// "count": [5]
/// },
/// "max_retries_count": 5
/// }
/// ```
///
/// This config represents
///
/// `start_after`: The first psync should happen after 60 seconds
///
/// `f... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/payment_sync.rs | crate: router
#[async_trait::async_trait]
impl ProcessTrackerWorkflow<SessionState> for PaymentsSyncWorkflow {
#[cfg(feature = "v2")]
async fn execute_workflow<'a>(
&'a self,
_state: &'a SessionState,
_proc... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/payment_sync.rs | crate: router
use common_utils::ext_traits::{OptionExt, StringExt, ValueExt};
use scheduler::{
consumer::{self, types::process_data, workflows::ProcessTrackerWorkflow},
errors as sch_errors, utils as scheduler_utils,
};
fn test_ge... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/payment_sync.rs | crate: router
use common_utils::ext_traits::{OptionExt, StringExt, ValueExt};
use diesel_models::process_tracker::business_status;
use scheduler::{
consumer::{self, types::process_data, workflows::ProcessTrackerWorkflow},
errors a... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/payment_sync.rs | crate: router
use scheduler::{
consumer::{self, types::process_data, workflows::ProcessTrackerWorkflow},
errors as sch_errors, utils as scheduler_utils,
};
use crate::{
consts,
core::{
errors::StorageErrorExt,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/payment_sync.rs | crate: router
use scheduler::{
consumer::{self, types::process_data, workflows::ProcessTrackerWorkflow},
errors as sch_errors, utils as scheduler_utils,
};
use crate::{
consts,
core::{
errors::StorageErrorExt,
... | ast_fragments |
// file: hyperswitch/crates/router/src/workflows/payment_sync.rs | crate: router
use common_utils::ext_traits::{OptionExt, StringExt, ValueExt};
use diesel_models::process_tracker::business_status;
use router_env::logger;
use scheduler::{
consumer::{self, types::process_data, workflows::ProcessTrackerWorkflow},
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/workflows/payment_method_status_update.rs | crate: router
use scheduler::{
consumer::types::process_data, utils as pt_utils, workflows::ProcessTrackerWorkflow,
};
use crate::{
errors,
logger::error,
routes::SessionState,
types::storage::{self, Pa... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/ext_traits.rs | crate: router
use crate::{
core::errors::{self, ApiErrorResponse, CustomResult, RouterResult},
utils::when,
};
fn validate_opt(self, func: F) -> CustomResult<(), errors::ValidationError> {
{
Some(val) => func(val),<|fim_suffix|>
<|fim_m... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/ext_traits.rs | crate: router
use error_stack::{Report, ResultExt};
use crate::{
core::errors::{self, ApiErrorResponse, CustomResult, RouterResult},
utils::when,
};
fn get_required_value(self, field_name: &'static str) -> RouterResult<T> {
{
Some(v) =>... | ast_fragments |
// file: hyperswitch/crates/router/src/utils/ext_traits.rs | crate: router
use crate::{
core::errors::{self, ApiErrorResponse, CustomResult, RouterResult},
utils::when,
};
fn validate_opt(self, func: F) -> CustomResult<(), errors::ValidationError> {
match self {
Some(val) => func(val),
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/ext_traits.rs | crate: router
use error_stack::{Report, ResultExt};
use crate::{
core::errors::{self, ApiErrorResponse, CustomResult, RouterResult},
utils::when,
};
fn get_required_value(self, field_name: &'static str) -> RouterResult<T> {
<|fim_suffix... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/ext_traits.rs | crate: router
use error_stack::{Report, ResultExt};
use crate::{
core::errors::{self, ApiErrorResponse, CustomResult, RouterResult},
utils::when,
};
fn check_value_present(&self, field_name: &'static str) -> RouterResult<()> {
<|fim_suf... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use api_models::user as user_api;
use common_enums::UserAuthType;
use common_utils::{
encryption::Encryption, errors::CustomResult, id_type, type_name, types::keymanager::Identifier,
};
use diesel_models::organization::{self, Organi... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use api_models::user as user_api;
use common_utils::{
encryption::Encryption, errors::CustomResult, id_type, type_name, types::keymanager::Identifier,
};
use diesel_models::organization::{self, OrganizationBridge};
use masking::{Exp... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use api_models::user as user_api;
use common_utils::{
encryption::Encryption, errors::CustomResult, id_type, type_name, types::keymanager::Identifier,
};
use diesel_models::organization::{self, OrganizationBridge};
use masking::{Exp... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use diesel_models::organization::{self, OrganizationBridge};
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, UserResult},
routes::SessionState,
services::{
a... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use common_enums::UserAuthType;
pub fn is_sso_auth_type(auth_type: UserAuthType) -> bool {
{
UserAuthType::OpenIdConnect => true,<|fim_suffix|>
<|fim_middle|>
UserAuthType::Password | UserAuthType::MagicLink => false,
}
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use api_models::user as user_api;
fn foreign_from(from: &user_api::AuthConfig) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use common_enums::UserAuthType;
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, UserResult},
routes::SessionState,
services::{
authentication::{AuthToken, Us... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use common_enums::UserAuthType;
pub fn is_sso_auth_type(auth_type: UserAuthType) -> bool {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use api_models::user as user_api;
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, UserResult},
routes::SessionState,
services::{
authentication::{AuthToken, ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, UserResult},
routes::SessionState,
services::{
authentication::{AuthToken, UserFromToken},
authorizat... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use masking::{ExposeInterface, Secret};
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, UserResult},
routes::SessionState,
services::{
authentication::{AuthT... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use masking::{ExposeInterface, Secret};
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, UserResult},
routes::SessionState,
services::{
authentication::{AuthT... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use common_utils::{
encryption::Encryption, errors::CustomResult, id_type, type_name, types::keymanager::Identifier,
};
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, U... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use api_models::user as user_api;
fn foreign_from(from: &user_api::AuthConfig) -> Self {
{
user_api::AuthConfig::OpenIdConnect { .. } => Self::OpenIdConnect,<|fim_suffix|>
<|fim_middle|>
user_api::AuthConfig::MagicLink => Self::MagicLin... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use std::sync::Arc;
use redis_interface::RedisConnectionPool;
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, UserResult},
routes::SessionState,
services::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use common_utils::{
encryption::Encryption, errors::CustomResult, id_type, type_name, types::keymanager::Identifier,
};
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, U... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils/user.rs | crate: router
use api_models::user as user_api;
use crate::{
consts::user::{REDIS_SSO_PREFIX, REDIS_SSO_TTL},
core::errors::{StorageError, UserErrors, UserResult},
routes::SessionState,
services::{
authentication::{AuthToken, ... | ast_fragments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.