pub struct EditNotificationRequest {
pub priority: NotificationPriority,
pub require_ack: bool,
pub title: String,
pub body: String,
pub toast: bool,
pub expires_at: Option<DateTime<Utc>>,
pub reset_acks: bool,
}Expand description
Operator-facing request body for PATCH /api/notifications/{id} — edit
an already-sent notification’s content (fix a typo, shorten/extend the
expiry, change priority / require_ack / toast) without re-sending it.
The audience is immutable here — there is no target field. Changing
who it goes to is “recall → re-send” (the backend keeps the original
fan-out subjects). id, issued_at, and issued_by are preserved; only
the fields below change. The backend deletes the old stream copies and
re-publishes the merged notification under the same id + issued_at (so
“sent at” is unchanged), stamping Notification::edited_at.
Unlike PublishNotificationRequest this is a full edit set (the SPA
pre-fills every field from the current notification and submits them all),
so there is no per-field optionality to disambiguate; expires_at: None
means “never expires”, a past instant expires it immediately.
Fields§
§priority: NotificationPriority§require_ack: bool§title: String§body: String§toast: bool§expires_at: Option<DateTime<Utc>>None ⇒ never expires; a past instant expires it immediately (unlike
publish, which rejects a past expiry as a likely typo — here it is a
deliberate “retire it but keep history” choice, distinct from recall).
reset_acks: boolReset confirmations: when true the backend clears every recorded ack
for this notification and stamps Notification::acks_reset_at, so a
materially-changed body forces everyone to re-confirm. false (the
default, e.g. a typo fix) leaves existing confirmations intact.
Trait Implementations§
Source§impl Clone for EditNotificationRequest
impl Clone for EditNotificationRequest
Source§fn clone(&self) -> EditNotificationRequest
fn clone(&self) -> EditNotificationRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EditNotificationRequest
impl Debug for EditNotificationRequest
Source§impl<'de> Deserialize<'de> for EditNotificationRequest
impl<'de> Deserialize<'de> for EditNotificationRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for EditNotificationRequest
impl JsonSchema for EditNotificationRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more