pub struct ConvocationUseCases { /* private fields */ }Implementations§
Source§impl ConvocationUseCases
impl ConvocationUseCases
pub fn new( convocation_repository: Arc<dyn ConvocationRepository>, recipient_repository: Arc<dyn ConvocationRecipientRepository>, owner_repository: Arc<dyn OwnerRepository>, building_repository: Arc<dyn BuildingRepository>, meeting_repository: Arc<dyn MeetingRepository>, ) -> Self
Sourcepub async fn create_convocation(
&self,
organization_id: Uuid,
request: CreateConvocationRequest,
created_by: Uuid,
) -> Result<ConvocationResponse, String>
pub async fn create_convocation( &self, organization_id: Uuid, request: CreateConvocationRequest, created_by: Uuid, ) -> Result<ConvocationResponse, String>
Create a new convocation
Sourcepub async fn get_convocation(
&self,
id: Uuid,
) -> Result<ConvocationResponse, String>
pub async fn get_convocation( &self, id: Uuid, ) -> Result<ConvocationResponse, String>
Get convocation by ID
Sourcepub async fn get_convocation_by_meeting(
&self,
meeting_id: Uuid,
) -> Result<Option<ConvocationResponse>, String>
pub async fn get_convocation_by_meeting( &self, meeting_id: Uuid, ) -> Result<Option<ConvocationResponse>, String>
Get convocation by meeting ID
Sourcepub async fn list_building_convocations(
&self,
building_id: Uuid,
) -> Result<Vec<ConvocationResponse>, String>
pub async fn list_building_convocations( &self, building_id: Uuid, ) -> Result<Vec<ConvocationResponse>, String>
List convocations for a building
Sourcepub async fn list_organization_convocations(
&self,
organization_id: Uuid,
) -> Result<Vec<ConvocationResponse>, String>
pub async fn list_organization_convocations( &self, organization_id: Uuid, ) -> Result<Vec<ConvocationResponse>, String>
List convocations for an organization
Sourcepub async fn schedule_convocation(
&self,
id: Uuid,
request: ScheduleConvocationRequest,
) -> Result<ConvocationResponse, String>
pub async fn schedule_convocation( &self, id: Uuid, request: ScheduleConvocationRequest, ) -> Result<ConvocationResponse, String>
Schedule convocation to be sent at specific date
Sourcepub async fn send_convocation(
&self,
id: Uuid,
request: SendConvocationRequest,
) -> Result<ConvocationResponse, String>
pub async fn send_convocation( &self, id: Uuid, request: SendConvocationRequest, ) -> Result<ConvocationResponse, String>
Send convocation to owners (generates PDF, creates recipients, sends emails) This would typically be called by a background job or email service
Sourcepub async fn mark_recipient_email_sent(
&self,
recipient_id: Uuid,
) -> Result<ConvocationRecipientResponse, String>
pub async fn mark_recipient_email_sent( &self, recipient_id: Uuid, ) -> Result<ConvocationRecipientResponse, String>
Mark recipient email as sent
Sourcepub async fn mark_recipient_email_opened(
&self,
recipient_id: Uuid,
) -> Result<ConvocationRecipientResponse, String>
pub async fn mark_recipient_email_opened( &self, recipient_id: Uuid, ) -> Result<ConvocationRecipientResponse, String>
Mark recipient email as opened (tracking pixel or link click)
Sourcepub async fn update_recipient_attendance(
&self,
recipient_id: Uuid,
status: AttendanceStatus,
) -> Result<ConvocationRecipientResponse, String>
pub async fn update_recipient_attendance( &self, recipient_id: Uuid, status: AttendanceStatus, ) -> Result<ConvocationRecipientResponse, String>
Update recipient attendance status
Sourcepub async fn set_recipient_proxy(
&self,
recipient_id: Uuid,
proxy_owner_id: Uuid,
) -> Result<ConvocationRecipientResponse, String>
pub async fn set_recipient_proxy( &self, recipient_id: Uuid, proxy_owner_id: Uuid, ) -> Result<ConvocationRecipientResponse, String>
Set proxy delegation for recipient
Sourcepub async fn send_reminders(
&self,
convocation_id: Uuid,
) -> Result<Vec<ConvocationRecipientResponse>, String>
pub async fn send_reminders( &self, convocation_id: Uuid, ) -> Result<Vec<ConvocationRecipientResponse>, String>
Send reminders to recipients who haven’t opened the convocation (J-3) This would typically be called by a background job
Sourcepub async fn get_tracking_summary(
&self,
convocation_id: Uuid,
) -> Result<RecipientTrackingSummaryResponse, String>
pub async fn get_tracking_summary( &self, convocation_id: Uuid, ) -> Result<RecipientTrackingSummaryResponse, String>
Get tracking summary for convocation
Sourcepub async fn list_convocation_recipients(
&self,
convocation_id: Uuid,
) -> Result<Vec<ConvocationRecipientResponse>, String>
pub async fn list_convocation_recipients( &self, convocation_id: Uuid, ) -> Result<Vec<ConvocationRecipientResponse>, String>
Get all recipients for a convocation
Sourcepub async fn cancel_convocation(
&self,
id: Uuid,
) -> Result<ConvocationResponse, String>
pub async fn cancel_convocation( &self, id: Uuid, ) -> Result<ConvocationResponse, String>
Cancel convocation
Sourcepub async fn delete_convocation(&self, id: Uuid) -> Result<bool, String>
pub async fn delete_convocation(&self, id: Uuid) -> Result<bool, String>
Delete convocation (and all recipients via CASCADE)
Sourcepub async fn process_scheduled_convocations(
&self,
) -> Result<Vec<ConvocationResponse>, String>
pub async fn process_scheduled_convocations( &self, ) -> Result<Vec<ConvocationResponse>, String>
Process scheduled convocations (called by background job) Returns list of convocations that were sent
Sourcepub async fn process_reminder_sending(
&self,
) -> Result<Vec<ConvocationResponse>, String>
pub async fn process_reminder_sending( &self, ) -> Result<Vec<ConvocationResponse>, String>
Process reminder sending (called by background job) Returns list of convocations that had reminders sent
Auto Trait Implementations§
impl Freeze for ConvocationUseCases
impl !RefUnwindSafe for ConvocationUseCases
impl Send for ConvocationUseCases
impl Sync for ConvocationUseCases
impl Unpin for ConvocationUseCases
impl !UnwindSafe for ConvocationUseCases
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more