atrium_api/chat/bsky/group/
create_join_link.rs1pub const NSID: &str = "chat.bsky.group.createJoinLink";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7 pub convo_id: String,
8 pub join_rule: crate::chat::bsky::group::defs::JoinRule,
9 #[serde(skip_serializing_if = "core::option::Option::is_none")]
10 pub require_approval: core::option::Option<bool>,
11}
12pub type Input = crate::types::Object<InputData>;
13#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
14#[serde(rename_all = "camelCase")]
15pub struct OutputData {
16 pub join_link: crate::chat::bsky::group::defs::JoinLinkView,
17}
18pub type Output = crate::types::Object<OutputData>;
19#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
20#[serde(tag = "error", content = "message")]
21pub enum Error {
22 EnabledJoinLinkAlreadyExists(Option<String>),
23 InvalidConvo(Option<String>),
24 InsufficientRole(Option<String>),
25}
26impl std::fmt::Display for Error {
27 fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
28 match self {
29 Error::EnabledJoinLinkAlreadyExists(msg) => {
30 write!(_f, "EnabledJoinLinkAlreadyExists")?;
31 if let Some(msg) = msg {
32 write!(_f, ": {msg}")?;
33 }
34 }
35 Error::InvalidConvo(msg) => {
36 write!(_f, "InvalidConvo")?;
37 if let Some(msg) = msg {
38 write!(_f, ": {msg}")?;
39 }
40 }
41 Error::InsufficientRole(msg) => {
42 write!(_f, "InsufficientRole")?;
43 if let Some(msg) = msg {
44 write!(_f, ": {msg}")?;
45 }
46 }
47 }
48 Ok(())
49 }
50}