atrium-api 0.26.0

API library for AT Protocol (Bluesky)
Documentation
// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `chat.bsky.moderation.defs` namespace.
///A view of a conversation for moderation purposes. Unlike chat.bsky.convo.defs#convoView, it does not include viewer-specific data (such as muted, unreadCount, status, lastMessage, lastReaction), since the requester is a moderator and not a member of the conversation. The member list is not included; use chat.bsky.moderation.getConvoMembers to list members.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ConvoViewData {
    pub id: String,
    ///Union field that has data specific to different kinds of convos.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub kind: core::option::Option<crate::types::Union<ConvoViewKindRefs>>,
    pub rev: String,
}
pub type ConvoView = crate::types::Object<ConvoViewData>;
///Data specific to a direct conversation, for moderation purposes.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct DirectConvoData {}
pub type DirectConvo = crate::types::Object<DirectConvoData>;
///Data specific to a group conversation, for moderation purposes. Unlike chat.bsky.convo.defs#groupConvo, it does not include viewer-specific data (such as unreadJoinRequestCount), since the requester is a moderator and not a member of the conversation.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct GroupConvoData {
    pub created_at: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub join_link: core::option::Option<crate::chat::bsky::group::defs::JoinLinkView>,
    ///The total number of pending join requests for the group conversation. This information is only visible to the owner and to moderators. Capped at 21.
    pub join_request_count: i64,
    ///The lock status of the conversation.
    pub lock_status: crate::chat::bsky::convo::defs::ConvoLockStatus,
    ///The total number of members in the group conversation.
    pub member_count: i64,
    ///The maximum number of members allowed in the group conversation.
    pub member_limit: i64,
    ///The display name of the group conversation.
    pub name: String,
}
pub type GroupConvo = crate::types::Object<GroupConvoData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ConvoViewKindRefs {
    #[serde(rename = "chat.bsky.moderation.defs#directConvo")]
    DirectConvo(Box<DirectConvo>),
    #[serde(rename = "chat.bsky.moderation.defs#groupConvo")]
    GroupConvo(Box<GroupConvo>),
}