Skip to main content

FollowupsResource

Struct FollowupsResource 

Source
pub struct FollowupsResource<'a> { /* private fields */ }
Expand description

client.followups()

Implementations§

Source§

impl<'a> FollowupsResource<'a>

Source

pub fn complete( &self, follow_up_id: impl Display, body: &FollowUpCompletionCreate, ) -> Result<FollowUp2>

Complete follow-up

POST /followups/{followUpId}/complete

Sets doneDate to the current timestamp and records completion history. The subject person must be visible. Group-associated follow-ups require “churchdb +do followup” permission in that group. A supplied nonzero successGroupId adds or updates the subject’s membership in that selected group, including overwriting an existing membership’s role/status. Configured fixed-group/group-type restrictions are checked; a configured group is not selected automatically. Emits a completion event, which can trigger configured continuations or routines. Repeating this operation replaces doneDate, writes another history entry and emits another event. Due dates are retained.

§Example
let body = models::FollowUpCompletionCreate {
    success_group_id: Some(Some(42)),
    ..Default::default()
};
let followup = client.followups().complete(2, &body)?;
println!("{}", followup.title);
Source

pub fn delete(&self, follow_up_id: impl Display) -> Result<()>

Delete follow-up

DELETE /followups/{followUpId}

Deletes the follow-up and records deletion history in a transaction. Its specification is also deleted when it is not shared; a shared specification remains. Deletion requires access to the subject person and, for a group-associated follow-up, follow-up administration rights in that group. No dryRun/dependency-preview behavior is implemented. This removes the follow-up rather than marking it finished; it does not reverse group memberships or routine effects caused by earlier completion.

§Example
client.followups().delete(2)?;
Source

pub fn dismiss( &self, follow_up_id: impl Display, body: &BTreeMap<String, Value>, ) -> Result<FollowUp2>

Dismiss follow-up

POST /followups/{followUpId}/dismiss

Marks the follow-up as finished by setting doneDate to the current timestamp and recording a dismissal history entry. The subject person must be visible. Group-associated follow-ups require “churchdb +do followup” permission in that group. No success-group membership is changed and no completion event is emitted. Completion and dismissal both appear through doneDate and differ only in history. Repeating dismissal updates doneDate and creates another history entry.

§Example
let body: std::collections::BTreeMap<String, serde_json::Value> = Default::default();
let followup = client.followups().dismiss(2, &body)?;
println!("{}", followup.title);
Source

pub fn get(&self, follow_up_id: impl Display) -> Result<FollowUp2>

Get follow-up

GET /followups/{followUpId}

Returns one follow-up, including its subject person/group context, responsible person, current/original due dates and configured completion group. The current owner may view it; a group-associated follow-up is also visible to users with that group’s follow-up execution or administration rights. This direct check is broader than the list selection: group follow-ups assigned to another person can be read by eligible group staff even when omitted from their list. The response does not include notes or history, nor indicate whether its underlying specification is shared.

§Example
let followup = client.followups().get(2)?;
println!("{}", followup.title);
Source

pub fn list(&self) -> Result<Vec<FollowUp2>>

List follow-ups assigned to the current user or eligible groups

GET /followups

Returns follow-ups owned by the current user plus unassigned group follow-ups for groups where the user has follow-up execution or administration rights. This includes personal and membership follow-ups; it is not an unrestricted list of every follow-up for a visible person. Archived subject persons are excluded. Date filters use effectiveDueDate and are combined with OR. Results are sorted by doneDate descending, then effectiveDueDate ascending, then ID ascending; finished items can precede open ones. Page/limit slice the result, but meta only contains count for this page, without a total or last page.

Use Self::list_with to pass query parameters.

§Example
for followup in client.followups().list()? {
    println!("{}", followup.title);
}
Source

pub fn list_with(&self, query: &GetFollowupsQuery) -> Result<Vec<FollowUp2>>

List follow-ups assigned to the current user or eligible groups

Like Self::list, with query parameters.

GET /followups

Returns follow-ups owned by the current user plus unassigned group follow-ups for groups where the user has follow-up execution or administration rights. This includes personal and membership follow-ups; it is not an unrestricted list of every follow-up for a visible person. Archived subject persons are excluded. Date filters use effectiveDueDate and are combined with OR. Results are sorted by doneDate descending, then effectiveDueDate ascending, then ID ascending; finished items can precede open ones. Page/limit slice the result, but meta only contains count for this page, without a total or last page.

Source

pub fn list_iter(&self, query: &GetFollowupsQuery) -> Items<FollowUp2> ⓘ

List follow-ups assigned to the current user or eligible groups

Like Self::list_with, but lazy: each page is fetched only when the iteration reaches it. Breaking off early saves the remaining requests.

Source

pub fn notes( &self, follow_up_id: impl Display, body: &FollowUpNoteCreate, ) -> Result<()>

Add a note to a follow-up

POST /followups/{followUpId}/notes

Creates a note linked to this follow-up. With also_apply_to_person=true, the same note is also linked to the subject person. commentViewerId applies only to the person link. The subject person must be visible; group-associated follow-ups require “churchdb +do followup” permission in that group.

Use Self::notes_with to pass query parameters.

§Example
let body = models::FollowUpNoteCreate {
    comment: "Called Alex; another conversation is planned for next week.".into(),
    ..Default::default()
};
client.followups().notes(2, &body)?;
Source

pub fn notes_with( &self, follow_up_id: impl Display, query: &PostFollowupsFollowUpIdNotesQuery, body: &FollowUpNoteCreate, ) -> Result<()>

Add a note to a follow-up

Like Self::notes, with query parameters.

POST /followups/{followUpId}/notes

Creates a note linked to this follow-up. With also_apply_to_person=true, the same note is also linked to the subject person. commentViewerId applies only to the person link. The subject person must be visible; group-associated follow-ups require “churchdb +do followup” permission in that group.

Source

pub fn postpone( &self, follow_up_id: impl Display, body: &FollowUpPostponeCreate, ) -> Result<FollowUp2>

Postpone follow-up

POST /followups/{followUpId}/postpone

Changes effectiveDueDate to a future calendar date and records postponement history. dueDate remains the original plan. The subject person must be visible. Group-associated follow-ups require “churchdb +do followup” permission in that group. Today is rejected. The method does not clear doneDate or reject already-finished follow-ups, so use reset to reopen one. No completion event or success-group action is performed.

§Example
let body = models::FollowUpPostponeCreate {
    due_date: "2026-12-01".parse()?,
    ..Default::default()
};
let followup = client.followups().postpone(2, &body)?;
println!("{}", followup.title);
Source

pub fn reset( &self, follow_up_id: impl Display, body: &FollowUpResetCreate, ) -> Result<FollowUp2>

Reset follow-up

POST /followups/{followUpId}/reset

Reopens the follow-up by clearing doneDate and records reset history. A supplied future dueDate becomes effectiveDueDate; otherwise the original dueDate is restored as the effective date. The original dueDate is unchanged. The subject person must be visible. Group-associated follow-ups require “churchdb +do followup” permission in that group. Reset is also accepted for an already-open follow-up. It does not undo previous completion effects.

§Example
let body = models::FollowUpResetCreate {
    due_date: Some(Some("2026-12-01".parse()?)),
    ..Default::default()
};
let followup = client.followups().reset(2, &body)?;
println!("{}", followup.title);
Source

pub fn update( &self, follow_up_id: impl Display, body: &Value, ) -> Result<FollowUp2>

Update follow-up

PUT /followups/{followUpId}

Updates mutable fields of the specified follow-up.

§Example
let body = serde_json::json!({
    "title": "Call Peter"
});
let result = client.followups().update(2, &body)?;
println!("{}", result.title);

Trait Implementations§

Source§

impl<'a> Clone for FollowupsResource<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for FollowupsResource<'a>

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for FollowupsResource<'a>

§

impl<'a> !UnwindSafe for FollowupsResource<'a>

§

impl<'a> Freeze for FollowupsResource<'a>

§

impl<'a> Send for FollowupsResource<'a>

§

impl<'a> Sync for FollowupsResource<'a>

§

impl<'a> Unpin for FollowupsResource<'a>

§

impl<'a> UnsafeUnpin for FollowupsResource<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more