backbone-mail 0.10.0

Odoo mail core port — message/notification/followers/activity/alias/sms queue (schema: messaging)
//! Application services
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Each entity service is a type alias over `GenericCrudService`.

pub mod error;
pub use error::{ServiceError, ServiceResult};

pub mod mail_activity_service;
pub mod mail_activity_type_service;
pub mod mail_activity_plan_service;
pub mod mail_activity_plan_template_service;
pub mod mail_alias_domain_service;
pub mod mail_alias_service;
pub mod mail_attachment_service;
pub mod mail_message_attachment_service;
pub mod mail_message_star_service;
pub mod mail_message_service;
pub mod mail_service;
pub mod mail_notification_service;
pub mod mail_message_subtype_service;
pub mod mail_message_reaction_service;
pub mod mail_followers_service;
pub mod mail_presence_service;
pub mod mail_blacklist_service;
pub mod mail_tracking_value_service;
pub mod discuss_channel_service;
pub mod discuss_channel_member_service;
pub mod mail_guest_service;
pub mod mail_server_service;
pub mod fetchmail_server_service;
pub mod mail_gateway_allowed_service;
pub mod phone_blacklist_service;
pub mod mail_message_schedule_service;
pub mod mail_scheduled_message_service;
pub mod sms_service;
pub mod sms_template_service;
pub mod sms_tracker_service;


pub use mail_activity_service::MailActivityService;
pub use mail_activity_type_service::MailActivityTypeService;
pub use mail_activity_plan_service::MailActivityPlanService;
pub use mail_activity_plan_template_service::MailActivityPlanTemplateService;
pub use mail_alias_domain_service::MailAliasDomainService;
pub use mail_alias_service::MailAliasService;
pub use mail_attachment_service::MailAttachmentService;
pub use mail_message_attachment_service::MailMessageAttachmentService;
pub use mail_message_star_service::MailMessageStarService;
pub use mail_message_service::MailMessageService;
pub use mail_service::MailService;
pub use mail_notification_service::MailNotificationService;
pub use mail_message_subtype_service::MailMessageSubtypeService;
pub use mail_message_reaction_service::MailMessageReactionService;
pub use mail_followers_service::MailFollowersService;
pub use mail_presence_service::MailPresenceService;
pub use mail_blacklist_service::MailBlacklistService;
pub use mail_tracking_value_service::MailTrackingValueService;
pub use discuss_channel_service::DiscussChannelService;
pub use discuss_channel_member_service::DiscussChannelMemberService;
pub use mail_guest_service::MailGuestService;
pub use mail_server_service::MailServerService;
pub use fetchmail_server_service::FetchmailServerService;
pub use mail_gateway_allowed_service::MailGatewayAllowedService;
pub use phone_blacklist_service::PhoneBlacklistService;
pub use mail_message_schedule_service::MailMessageScheduleService;
pub use mail_scheduled_message_service::MailScheduledMessageService;
pub use sms_service::SmsService;
pub use sms_template_service::SmsTemplateService;
pub use sms_tracker_service::SmsTrackerService;
pub use mail_activity_service::MailActivityRowRules;
pub use mail_activity_type_service::MailActivityTypeRowRules;
pub use mail_activity_plan_service::MailActivityPlanRowRules;
pub use mail_activity_plan_template_service::MailActivityPlanTemplateRowRules;
pub use mail_alias_domain_service::MailAliasDomainRowRules;
pub use mail_attachment_service::MailAttachmentRowRules;
pub use mail_message_attachment_service::MailMessageAttachmentRowRules;
pub use mail_message_star_service::MailMessageStarRowRules;
pub use mail_service::MailRowRules;
pub use mail_notification_service::MailNotificationRowRules;
pub use mail_message_subtype_service::MailMessageSubtypeRowRules;
pub use mail_message_reaction_service::MailMessageReactionRowRules;
pub use mail_followers_service::MailFollowersRowRules;
pub use mail_presence_service::MailPresenceRowRules;
pub use mail_blacklist_service::MailBlacklistRowRules;
pub use mail_tracking_value_service::MailTrackingValueRowRules;
pub use discuss_channel_member_service::DiscussChannelMemberRowRules;
pub use mail_guest_service::MailGuestRowRules;
pub use mail_server_service::MailServerRowRules;
pub use fetchmail_server_service::FetchmailServerRowRules;
pub use mail_gateway_allowed_service::MailGatewayAllowedRowRules;
pub use phone_blacklist_service::PhoneBlacklistRowRules;
pub use mail_message_schedule_service::MailMessageScheduleRowRules;
pub use mail_scheduled_message_service::MailScheduledMessageRowRules;
pub use sms_service::SmsRowRules;
pub use sms_template_service::SmsTemplateRowRules;
pub use sms_tracker_service::SmsTrackerRowRules;

/// A `MailActivityService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_activity_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailActivityRepository>,
) -> MailActivityService {
    MailActivityService::with_repository(repository).with_guard(std::sync::Arc::new(MailActivityRowRules))
}

/// A `MailActivityTypeService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_activity_type_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailActivityTypeRepository>,
) -> MailActivityTypeService {
    MailActivityTypeService::with_repository(repository).with_guard(std::sync::Arc::new(MailActivityTypeRowRules))
}

/// A `MailActivityPlanService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_activity_plan_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailActivityPlanRepository>,
) -> MailActivityPlanService {
    MailActivityPlanService::with_repository(repository).with_guard(std::sync::Arc::new(MailActivityPlanRowRules))
}

/// A `MailActivityPlanTemplateService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_activity_plan_template_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailActivityPlanTemplateRepository>,
) -> MailActivityPlanTemplateService {
    MailActivityPlanTemplateService::with_repository(repository).with_guard(std::sync::Arc::new(MailActivityPlanTemplateRowRules))
}

/// A `MailAliasDomainService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_alias_domain_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailAliasDomainRepository>,
) -> MailAliasDomainService {
    MailAliasDomainService::with_repository(repository).with_guard(std::sync::Arc::new(MailAliasDomainRowRules))
}

/// A `MailAliasService` over `repository`: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_alias_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailAliasRepository>,
) -> MailAliasService {
    MailAliasService::with_repository(repository)
}

/// A `MailAttachmentService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_attachment_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailAttachmentRepository>,
) -> MailAttachmentService {
    MailAttachmentService::with_repository(repository).with_guard(std::sync::Arc::new(MailAttachmentRowRules))
}

/// A `MailMessageAttachmentService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_message_attachment_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailMessageAttachmentRepository>,
) -> MailMessageAttachmentService {
    MailMessageAttachmentService::with_repository(repository).with_guard(std::sync::Arc::new(MailMessageAttachmentRowRules))
}

/// A `MailMessageStarService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_message_star_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailMessageStarRepository>,
) -> MailMessageStarService {
    MailMessageStarService::with_repository(repository).with_guard(std::sync::Arc::new(MailMessageStarRowRules))
}

/// A `MailMessageService` over `repository`: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_message_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailMessageRepository>,
) -> MailMessageService {
    MailMessageService::with_repository(repository)
}

/// A `MailService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailRepository>,
) -> MailService {
    MailService::with_repository(repository).with_guard(std::sync::Arc::new(MailRowRules))
}

/// A `MailNotificationService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_notification_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailNotificationRepository>,
) -> MailNotificationService {
    MailNotificationService::with_repository(repository).with_guard(std::sync::Arc::new(MailNotificationRowRules))
}

/// A `MailMessageSubtypeService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_message_subtype_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailMessageSubtypeRepository>,
) -> MailMessageSubtypeService {
    MailMessageSubtypeService::with_repository(repository).with_guard(std::sync::Arc::new(MailMessageSubtypeRowRules))
}

/// A `MailMessageReactionService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_message_reaction_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailMessageReactionRepository>,
) -> MailMessageReactionService {
    MailMessageReactionService::with_repository(repository).with_guard(std::sync::Arc::new(MailMessageReactionRowRules))
}

/// A `MailFollowersService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_followers_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailFollowersRepository>,
) -> MailFollowersService {
    MailFollowersService::with_repository(repository).with_guard(std::sync::Arc::new(MailFollowersRowRules))
}

/// A `MailPresenceService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_presence_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailPresenceRepository>,
) -> MailPresenceService {
    MailPresenceService::with_repository(repository).with_guard(std::sync::Arc::new(MailPresenceRowRules))
}

/// A `MailBlacklistService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_blacklist_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailBlacklistRepository>,
) -> MailBlacklistService {
    MailBlacklistService::with_repository(repository).with_guard(std::sync::Arc::new(MailBlacklistRowRules))
}

/// A `MailTrackingValueService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_tracking_value_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailTrackingValueRepository>,
) -> MailTrackingValueService {
    MailTrackingValueService::with_repository(repository).with_guard(std::sync::Arc::new(MailTrackingValueRowRules))
}

/// A `DiscussChannelService` over `repository`: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_discuss_channel_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::DiscussChannelRepository>,
) -> DiscussChannelService {
    DiscussChannelService::with_repository(repository)
}

/// A `DiscussChannelMemberService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_discuss_channel_member_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::DiscussChannelMemberRepository>,
) -> DiscussChannelMemberService {
    DiscussChannelMemberService::with_repository(repository).with_guard(std::sync::Arc::new(DiscussChannelMemberRowRules))
}

/// A `MailGuestService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_guest_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailGuestRepository>,
) -> MailGuestService {
    MailGuestService::with_repository(repository).with_guard(std::sync::Arc::new(MailGuestRowRules))
}

/// A `MailServerService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_server_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailServerRepository>,
) -> MailServerService {
    MailServerService::with_repository(repository).with_guard(std::sync::Arc::new(MailServerRowRules))
}

/// A `FetchmailServerService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_fetchmail_server_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::FetchmailServerRepository>,
) -> FetchmailServerService {
    FetchmailServerService::with_repository(repository).with_guard(std::sync::Arc::new(FetchmailServerRowRules))
}

/// A `MailGatewayAllowedService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_gateway_allowed_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailGatewayAllowedRepository>,
) -> MailGatewayAllowedService {
    MailGatewayAllowedService::with_repository(repository).with_guard(std::sync::Arc::new(MailGatewayAllowedRowRules))
}

/// A `PhoneBlacklistService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_phone_blacklist_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::PhoneBlacklistRepository>,
) -> PhoneBlacklistService {
    PhoneBlacklistService::with_repository(repository).with_guard(std::sync::Arc::new(PhoneBlacklistRowRules))
}

/// A `MailMessageScheduleService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_message_schedule_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailMessageScheduleRepository>,
) -> MailMessageScheduleService {
    MailMessageScheduleService::with_repository(repository).with_guard(std::sync::Arc::new(MailMessageScheduleRowRules))
}

/// A `MailScheduledMessageService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_mail_scheduled_message_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::MailScheduledMessageRepository>,
) -> MailScheduledMessageService {
    MailScheduledMessageService::with_repository(repository).with_guard(std::sync::Arc::new(MailScheduledMessageRowRules))
}

/// A `SmsService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_sms_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::SmsRepository>,
) -> SmsService {
    SmsService::with_repository(repository).with_guard(std::sync::Arc::new(SmsRowRules))
}

/// A `SmsTemplateService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_sms_template_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::SmsTemplateRepository>,
) -> SmsTemplateService {
    SmsTemplateService::with_repository(repository).with_guard(std::sync::Arc::new(SmsTemplateRowRules))
}

/// A `SmsTrackerService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_sms_tracker_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::SmsTrackerRepository>,
) -> SmsTrackerService {
    SmsTrackerService::with_repository(repository).with_guard(std::sync::Arc::new(SmsTrackerRowRules))
}

// This directory's extension (hand-written; ADR-0031).
include!("mod.ext.rs");