jacquard_api/place_stream/
server.rs

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)]
25#[serde(rename_all = "camelCase")]
26pub struct RewriteRule<'a> {
27    ///Text to search for and replace.
28    #[serde(borrow)]
29    pub from: jacquard_common::CowStr<'a>,
30    ///Text to replace with.
31    #[serde(borrow)]
32    pub to: jacquard_common::CowStr<'a>,
33}
34
35///A webhook configuration for receiving Streamplace events.
36#[jacquard_derive::lexicon]
37#[derive(
38    serde::Serialize,
39    serde::Deserialize,
40    Debug,
41    Clone,
42    PartialEq,
43    Eq,
44    jacquard_derive::IntoStatic
45)]
46#[serde(rename_all = "camelCase")]
47pub struct Webhook<'a> {
48    ///Whether this webhook is currently active.
49    pub active: bool,
50    ///When this webhook was created.
51    pub created_at: jacquard_common::types::string::Datetime,
52    ///A description of what this webhook is used for.
53    #[serde(skip_serializing_if = "std::option::Option::is_none")]
54    #[serde(borrow)]
55    pub description: std::option::Option<jacquard_common::CowStr<'a>>,
56    ///Number of consecutive errors for this webhook.
57    #[serde(skip_serializing_if = "std::option::Option::is_none")]
58    pub error_count: std::option::Option<i64>,
59    ///The types of events this webhook should receive.
60    #[serde(borrow)]
61    pub events: Vec<jacquard_common::CowStr<'a>>,
62    ///Unique identifier for this webhook.
63    #[serde(borrow)]
64    pub id: jacquard_common::CowStr<'a>,
65    ///When this webhook was last triggered.
66    #[serde(skip_serializing_if = "std::option::Option::is_none")]
67    pub last_triggered: std::option::Option<jacquard_common::types::string::Datetime>,
68    ///Words to filter out from chat messages. Messages containing any of these words will not be forwarded.
69    #[serde(skip_serializing_if = "std::option::Option::is_none")]
70    #[serde(borrow)]
71    pub mute_words: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
72    ///A user-friendly name for this webhook.
73    #[serde(skip_serializing_if = "std::option::Option::is_none")]
74    #[serde(borrow)]
75    pub name: std::option::Option<jacquard_common::CowStr<'a>>,
76    ///Text to prepend to webhook messages.
77    #[serde(skip_serializing_if = "std::option::Option::is_none")]
78    #[serde(borrow)]
79    pub prefix: std::option::Option<jacquard_common::CowStr<'a>>,
80    ///Text replacement rules for webhook messages.
81    #[serde(skip_serializing_if = "std::option::Option::is_none")]
82    #[serde(borrow)]
83    pub rewrite: std::option::Option<Vec<crate::place_stream::server::RewriteRule<'a>>>,
84    ///Text to append to webhook messages.
85    #[serde(skip_serializing_if = "std::option::Option::is_none")]
86    #[serde(borrow)]
87    pub suffix: std::option::Option<jacquard_common::CowStr<'a>>,
88    ///When this webhook was last updated.
89    #[serde(skip_serializing_if = "std::option::Option::is_none")]
90    pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>,
91    ///The webhook URL where events will be sent.
92    #[serde(borrow)]
93    pub url: jacquard_common::types::string::Uri<'a>,
94}