A better Rust ATProto crate
at main 3.6 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: place.stream.server.defs 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8pub mod create_webhook; 9pub mod delete_webhook; 10pub mod get_webhook; 11pub mod list_webhooks; 12pub mod settings; 13pub mod update_webhook; 14 15#[jacquard_derive::lexicon] 16#[derive( 17 serde::Serialize, 18 serde::Deserialize, 19 Debug, 20 Clone, 21 PartialEq, 22 Eq, 23 jacquard_derive::IntoStatic, 24 Default 25)] 26#[serde(rename_all = "camelCase")] 27pub struct RewriteRule<'a> { 28 /// Text to search for and replace. 29 #[serde(borrow)] 30 pub from: jacquard_common::CowStr<'a>, 31 /// Text to replace with. 32 #[serde(borrow)] 33 pub to: jacquard_common::CowStr<'a>, 34} 35 36/// A webhook configuration for receiving Streamplace events. 37#[jacquard_derive::lexicon] 38#[derive( 39 serde::Serialize, 40 serde::Deserialize, 41 Debug, 42 Clone, 43 PartialEq, 44 Eq, 45 jacquard_derive::IntoStatic, 46 bon::Builder 47)] 48#[serde(rename_all = "camelCase")] 49pub struct Webhook<'a> { 50 /// Whether this webhook is currently active. 51 pub active: bool, 52 /// When this webhook was created. 53 pub created_at: jacquard_common::types::string::Datetime, 54 /// A description of what this webhook is used for. 55 #[serde(skip_serializing_if = "std::option::Option::is_none")] 56 #[builder(into)] 57 #[serde(borrow)] 58 pub description: Option<jacquard_common::CowStr<'a>>, 59 /// Number of consecutive errors for this webhook. 60 #[serde(skip_serializing_if = "std::option::Option::is_none")] 61 #[builder(into)] 62 pub error_count: Option<i64>, 63 /// The types of events this webhook should receive. 64 #[serde(borrow)] 65 pub events: Vec<jacquard_common::CowStr<'a>>, 66 /// Unique identifier for this webhook. 67 #[serde(borrow)] 68 #[builder(into)] 69 pub id: jacquard_common::CowStr<'a>, 70 /// When this webhook was last triggered. 71 #[serde(skip_serializing_if = "std::option::Option::is_none")] 72 #[builder(into)] 73 pub last_triggered: Option<jacquard_common::types::string::Datetime>, 74 /// Words to filter out from chat messages. Messages containing any of these words will not be forwarded. 75 #[serde(skip_serializing_if = "std::option::Option::is_none")] 76 #[builder(into)] 77 #[serde(borrow)] 78 pub mute_words: Option<Vec<jacquard_common::CowStr<'a>>>, 79 /// A user-friendly name for this webhook. 80 #[serde(skip_serializing_if = "std::option::Option::is_none")] 81 #[builder(into)] 82 #[serde(borrow)] 83 pub name: Option<jacquard_common::CowStr<'a>>, 84 /// Text to prepend to webhook messages. 85 #[serde(skip_serializing_if = "std::option::Option::is_none")] 86 #[builder(into)] 87 #[serde(borrow)] 88 pub prefix: Option<jacquard_common::CowStr<'a>>, 89 /// Text replacement rules for webhook messages. 90 #[serde(skip_serializing_if = "std::option::Option::is_none")] 91 #[builder(into)] 92 #[serde(borrow)] 93 pub rewrite: Option<Vec<crate::place_stream::server::RewriteRule<'a>>>, 94 /// Text to append to webhook messages. 95 #[serde(skip_serializing_if = "std::option::Option::is_none")] 96 #[builder(into)] 97 #[serde(borrow)] 98 pub suffix: Option<jacquard_common::CowStr<'a>>, 99 /// When this webhook was last updated. 100 #[serde(skip_serializing_if = "std::option::Option::is_none")] 101 #[builder(into)] 102 pub updated_at: Option<jacquard_common::types::string::Datetime>, 103 /// The webhook URL where events will be sent. 104 #[serde(borrow)] 105 pub url: jacquard_common::types::string::Uri<'a>, 106}