Skip to main content

atrium_api/chat/bsky/group/
defs.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `chat.bsky.group.defs` namespace.
3///Preview for a disabled join link. Carries only the code so clients can correlate with the input and render a disabled state.
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct DisabledJoinLinkPreviewViewData {
7    pub code: String,
8}
9pub type DisabledJoinLinkPreviewView = crate::types::Object<
10    DisabledJoinLinkPreviewViewData,
11>;
12///Preview for a join link code that does not map to an existing link. Carries only the code so clients can correlate with the input and render an invalid state.
13#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
14#[serde(rename_all = "camelCase")]
15pub struct InvalidJoinLinkPreviewViewData {
16    pub code: String,
17}
18pub type InvalidJoinLinkPreviewView = crate::types::Object<
19    InvalidJoinLinkPreviewViewData,
20>;
21///Preview that can be shown in feeds, including to unauthenticated viewers.
22#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
23#[serde(rename_all = "camelCase")]
24pub struct JoinLinkPreviewViewData {
25    pub code: String,
26    ///Present only if the request is authenticated and the user is a member of the group.
27    #[serde(skip_serializing_if = "core::option::Option::is_none")]
28    pub convo: core::option::Option<crate::chat::bsky::convo::defs::ConvoView>,
29    pub convo_id: String,
30    pub join_rule: JoinRule,
31    pub member_count: i64,
32    pub member_limit: i64,
33    pub name: String,
34    pub owner: crate::chat::bsky::actor::defs::ProfileViewBasic,
35    pub require_approval: bool,
36    #[serde(skip_serializing_if = "core::option::Option::is_none")]
37    pub viewer: core::option::Option<JoinLinkViewerState>,
38}
39pub type JoinLinkPreviewView = crate::types::Object<JoinLinkPreviewViewData>;
40///Join link view to be used within a group view, so the convo is surrounding, not specified inside this view.
41#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
42#[serde(rename_all = "camelCase")]
43pub struct JoinLinkViewData {
44    pub code: String,
45    pub created_at: crate::types::string::Datetime,
46    pub enabled_status: LinkEnabledStatus,
47    pub join_rule: JoinRule,
48    pub require_approval: bool,
49}
50pub type JoinLinkView = crate::types::Object<JoinLinkViewData>;
51#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
52#[serde(rename_all = "camelCase")]
53pub struct JoinLinkViewerStateData {
54    #[serde(skip_serializing_if = "core::option::Option::is_none")]
55    pub requested_at: core::option::Option<crate::types::string::Datetime>,
56}
57pub type JoinLinkViewerState = crate::types::Object<JoinLinkViewerStateData>;
58///A join request from the perspective of the requester, including enough group context to render the request in a list (e.g. group name, owner, member count).
59#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
60#[serde(rename_all = "camelCase")]
61pub struct JoinRequestConvoViewData {
62    pub convo_id: String,
63    pub member_count: i64,
64    pub member_limit: i64,
65    pub name: String,
66    pub owner: crate::chat::bsky::actor::defs::ProfileViewBasic,
67    pub viewer: JoinLinkViewerState,
68}
69pub type JoinRequestConvoView = crate::types::Object<JoinRequestConvoViewData>;
70///A join request from the perspective of the group owner.
71#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
72#[serde(rename_all = "camelCase")]
73pub struct JoinRequestViewData {
74    pub convo_id: String,
75    pub requested_at: crate::types::string::Datetime,
76    pub requested_by: crate::chat::bsky::actor::defs::ProfileViewBasic,
77}
78pub type JoinRequestView = crate::types::Object<JoinRequestViewData>;
79pub type JoinRule = String;
80pub type LinkEnabledStatus = String;