atrium_api/app/bsky/actor/
defs.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.actor.defs` namespace.
3#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
4#[serde(rename_all = "camelCase")]
5pub struct AdultContentPrefData {
6    pub enabled: bool,
7}
8pub type AdultContentPref = crate::types::Object<AdultContentPrefData>;
9///If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.
10#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
11#[serde(rename_all = "camelCase")]
12pub struct BskyAppProgressGuideData {
13    pub guide: String,
14}
15pub type BskyAppProgressGuide = crate::types::Object<BskyAppProgressGuideData>;
16///A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.
17#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
18#[serde(rename_all = "camelCase")]
19pub struct BskyAppStatePrefData {
20    #[serde(skip_serializing_if = "core::option::Option::is_none")]
21    pub active_progress_guide: core::option::Option<BskyAppProgressGuide>,
22    ///Storage for NUXs the user has encountered.
23    #[serde(skip_serializing_if = "core::option::Option::is_none")]
24    pub nuxs: core::option::Option<Vec<crate::app::bsky::actor::defs::Nux>>,
25    ///An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.
26    #[serde(skip_serializing_if = "core::option::Option::is_none")]
27    pub queued_nudges: core::option::Option<Vec<String>>,
28}
29pub type BskyAppStatePref = crate::types::Object<BskyAppStatePrefData>;
30#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
31#[serde(rename_all = "camelCase")]
32pub struct ContentLabelPrefData {
33    pub label: String,
34    ///Which labeler does this preference apply to? If undefined, applies globally.
35    #[serde(skip_serializing_if = "core::option::Option::is_none")]
36    pub labeler_did: core::option::Option<crate::types::string::Did>,
37    pub visibility: String,
38}
39pub type ContentLabelPref = crate::types::Object<ContentLabelPrefData>;
40#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
41#[serde(rename_all = "camelCase")]
42pub struct FeedViewPrefData {
43    ///The URI of the feed, or an identifier which describes the feed.
44    pub feed: String,
45    ///Hide quote posts in the feed.
46    #[serde(skip_serializing_if = "core::option::Option::is_none")]
47    pub hide_quote_posts: core::option::Option<bool>,
48    ///Hide replies in the feed.
49    #[serde(skip_serializing_if = "core::option::Option::is_none")]
50    pub hide_replies: core::option::Option<bool>,
51    ///Hide replies in the feed if they do not have this number of likes.
52    #[serde(skip_serializing_if = "core::option::Option::is_none")]
53    pub hide_replies_by_like_count: core::option::Option<i64>,
54    ///Hide replies in the feed if they are not by followed users.
55    #[serde(skip_serializing_if = "core::option::Option::is_none")]
56    pub hide_replies_by_unfollowed: core::option::Option<bool>,
57    ///Hide reposts in the feed.
58    #[serde(skip_serializing_if = "core::option::Option::is_none")]
59    pub hide_reposts: core::option::Option<bool>,
60}
61pub type FeedViewPref = crate::types::Object<FeedViewPrefData>;
62#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
63#[serde(rename_all = "camelCase")]
64pub struct HiddenPostsPrefData {
65    ///A list of URIs of posts the account owner has hidden.
66    pub items: Vec<String>,
67}
68pub type HiddenPostsPref = crate::types::Object<HiddenPostsPrefData>;
69#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
70#[serde(rename_all = "camelCase")]
71pub struct InterestsPrefData {
72    ///A list of tags which describe the account owner's interests gathered during onboarding.
73    pub tags: Vec<String>,
74}
75pub type InterestsPref = crate::types::Object<InterestsPrefData>;
76///The subject's followers whom you also follow
77#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
78#[serde(rename_all = "camelCase")]
79pub struct KnownFollowersData {
80    pub count: i64,
81    pub followers: Vec<ProfileViewBasic>,
82}
83pub type KnownFollowers = crate::types::Object<KnownFollowersData>;
84#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
85#[serde(rename_all = "camelCase")]
86pub struct LabelerPrefItemData {
87    pub did: crate::types::string::Did,
88}
89pub type LabelerPrefItem = crate::types::Object<LabelerPrefItemData>;
90#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
91#[serde(rename_all = "camelCase")]
92pub struct LabelersPrefData {
93    pub labelers: Vec<LabelerPrefItem>,
94}
95pub type LabelersPref = crate::types::Object<LabelersPrefData>;
96///A word that the account owner has muted.
97#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
98#[serde(rename_all = "camelCase")]
99pub struct MutedWordData {
100    ///Groups of users to apply the muted word to. If undefined, applies to all users.
101    #[serde(skip_serializing_if = "core::option::Option::is_none")]
102    pub actor_target: core::option::Option<String>,
103    ///The date and time at which the muted word will expire and no longer be applied.
104    #[serde(skip_serializing_if = "core::option::Option::is_none")]
105    pub expires_at: core::option::Option<crate::types::string::Datetime>,
106    #[serde(skip_serializing_if = "core::option::Option::is_none")]
107    pub id: core::option::Option<String>,
108    ///The intended targets of the muted word.
109    pub targets: Vec<crate::app::bsky::actor::defs::MutedWordTarget>,
110    ///The muted word itself.
111    pub value: String,
112}
113pub type MutedWord = crate::types::Object<MutedWordData>;
114pub type MutedWordTarget = String;
115#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
116#[serde(rename_all = "camelCase")]
117pub struct MutedWordsPrefData {
118    ///A list of words the account owner has muted.
119    pub items: Vec<crate::app::bsky::actor::defs::MutedWord>,
120}
121pub type MutedWordsPref = crate::types::Object<MutedWordsPrefData>;
122///A new user experiences (NUX) storage object
123#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
124#[serde(rename_all = "camelCase")]
125pub struct NuxData {
126    pub completed: bool,
127    ///Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.
128    #[serde(skip_serializing_if = "core::option::Option::is_none")]
129    pub data: core::option::Option<String>,
130    ///The date and time at which the NUX will expire and should be considered completed.
131    #[serde(skip_serializing_if = "core::option::Option::is_none")]
132    pub expires_at: core::option::Option<crate::types::string::Datetime>,
133    pub id: String,
134}
135pub type Nux = crate::types::Object<NuxData>;
136#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
137#[serde(rename_all = "camelCase")]
138pub struct PersonalDetailsPrefData {
139    ///The birth date of account owner.
140    #[serde(skip_serializing_if = "core::option::Option::is_none")]
141    pub birth_date: core::option::Option<crate::types::string::Datetime>,
142}
143pub type PersonalDetailsPref = crate::types::Object<PersonalDetailsPrefData>;
144///Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.
145#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
146#[serde(rename_all = "camelCase")]
147pub struct PostInteractionSettingsPrefData {
148    ///Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.
149    #[serde(skip_serializing_if = "core::option::Option::is_none")]
150    pub postgate_embedding_rules: core::option::Option<
151        Vec<crate::types::Union<PostInteractionSettingsPrefPostgateEmbeddingRulesItem>>,
152    >,
153    ///Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.
154    #[serde(skip_serializing_if = "core::option::Option::is_none")]
155    pub threadgate_allow_rules: core::option::Option<
156        Vec<crate::types::Union<PostInteractionSettingsPrefThreadgateAllowRulesItem>>,
157    >,
158}
159pub type PostInteractionSettingsPref = crate::types::Object<
160    PostInteractionSettingsPrefData,
161>;
162pub type Preferences = Vec<crate::types::Union<PreferencesItem>>;
163#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
164#[serde(rename_all = "camelCase")]
165pub struct ProfileAssociatedData {
166    #[serde(skip_serializing_if = "core::option::Option::is_none")]
167    pub chat: core::option::Option<ProfileAssociatedChat>,
168    #[serde(skip_serializing_if = "core::option::Option::is_none")]
169    pub feedgens: core::option::Option<i64>,
170    #[serde(skip_serializing_if = "core::option::Option::is_none")]
171    pub labeler: core::option::Option<bool>,
172    #[serde(skip_serializing_if = "core::option::Option::is_none")]
173    pub lists: core::option::Option<i64>,
174    #[serde(skip_serializing_if = "core::option::Option::is_none")]
175    pub starter_packs: core::option::Option<i64>,
176}
177pub type ProfileAssociated = crate::types::Object<ProfileAssociatedData>;
178#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
179#[serde(rename_all = "camelCase")]
180pub struct ProfileAssociatedChatData {
181    pub allow_incoming: String,
182}
183pub type ProfileAssociatedChat = crate::types::Object<ProfileAssociatedChatData>;
184#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
185#[serde(rename_all = "camelCase")]
186pub struct ProfileViewData {
187    #[serde(skip_serializing_if = "core::option::Option::is_none")]
188    pub associated: core::option::Option<ProfileAssociated>,
189    #[serde(skip_serializing_if = "core::option::Option::is_none")]
190    pub avatar: core::option::Option<String>,
191    #[serde(skip_serializing_if = "core::option::Option::is_none")]
192    pub created_at: core::option::Option<crate::types::string::Datetime>,
193    #[serde(skip_serializing_if = "core::option::Option::is_none")]
194    pub description: core::option::Option<String>,
195    pub did: crate::types::string::Did,
196    #[serde(skip_serializing_if = "core::option::Option::is_none")]
197    pub display_name: core::option::Option<String>,
198    pub handle: crate::types::string::Handle,
199    #[serde(skip_serializing_if = "core::option::Option::is_none")]
200    pub indexed_at: core::option::Option<crate::types::string::Datetime>,
201    #[serde(skip_serializing_if = "core::option::Option::is_none")]
202    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
203    #[serde(skip_serializing_if = "core::option::Option::is_none")]
204    pub viewer: core::option::Option<ViewerState>,
205}
206pub type ProfileView = crate::types::Object<ProfileViewData>;
207#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
208#[serde(rename_all = "camelCase")]
209pub struct ProfileViewBasicData {
210    #[serde(skip_serializing_if = "core::option::Option::is_none")]
211    pub associated: core::option::Option<ProfileAssociated>,
212    #[serde(skip_serializing_if = "core::option::Option::is_none")]
213    pub avatar: core::option::Option<String>,
214    #[serde(skip_serializing_if = "core::option::Option::is_none")]
215    pub created_at: core::option::Option<crate::types::string::Datetime>,
216    pub did: crate::types::string::Did,
217    #[serde(skip_serializing_if = "core::option::Option::is_none")]
218    pub display_name: core::option::Option<String>,
219    pub handle: crate::types::string::Handle,
220    #[serde(skip_serializing_if = "core::option::Option::is_none")]
221    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
222    #[serde(skip_serializing_if = "core::option::Option::is_none")]
223    pub viewer: core::option::Option<ViewerState>,
224}
225pub type ProfileViewBasic = crate::types::Object<ProfileViewBasicData>;
226#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
227#[serde(rename_all = "camelCase")]
228pub struct ProfileViewDetailedData {
229    #[serde(skip_serializing_if = "core::option::Option::is_none")]
230    pub associated: core::option::Option<ProfileAssociated>,
231    #[serde(skip_serializing_if = "core::option::Option::is_none")]
232    pub avatar: core::option::Option<String>,
233    #[serde(skip_serializing_if = "core::option::Option::is_none")]
234    pub banner: core::option::Option<String>,
235    #[serde(skip_serializing_if = "core::option::Option::is_none")]
236    pub created_at: core::option::Option<crate::types::string::Datetime>,
237    #[serde(skip_serializing_if = "core::option::Option::is_none")]
238    pub description: core::option::Option<String>,
239    pub did: crate::types::string::Did,
240    #[serde(skip_serializing_if = "core::option::Option::is_none")]
241    pub display_name: core::option::Option<String>,
242    #[serde(skip_serializing_if = "core::option::Option::is_none")]
243    pub followers_count: core::option::Option<i64>,
244    #[serde(skip_serializing_if = "core::option::Option::is_none")]
245    pub follows_count: core::option::Option<i64>,
246    pub handle: crate::types::string::Handle,
247    #[serde(skip_serializing_if = "core::option::Option::is_none")]
248    pub indexed_at: core::option::Option<crate::types::string::Datetime>,
249    #[serde(skip_serializing_if = "core::option::Option::is_none")]
250    pub joined_via_starter_pack: core::option::Option<
251        crate::app::bsky::graph::defs::StarterPackViewBasic,
252    >,
253    #[serde(skip_serializing_if = "core::option::Option::is_none")]
254    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
255    #[serde(skip_serializing_if = "core::option::Option::is_none")]
256    pub pinned_post: core::option::Option<crate::com::atproto::repo::strong_ref::Main>,
257    #[serde(skip_serializing_if = "core::option::Option::is_none")]
258    pub posts_count: core::option::Option<i64>,
259    #[serde(skip_serializing_if = "core::option::Option::is_none")]
260    pub viewer: core::option::Option<ViewerState>,
261}
262pub type ProfileViewDetailed = crate::types::Object<ProfileViewDetailedData>;
263#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
264#[serde(rename_all = "camelCase")]
265pub struct SavedFeedData {
266    pub id: String,
267    pub pinned: bool,
268    pub r#type: String,
269    pub value: String,
270}
271pub type SavedFeed = crate::types::Object<SavedFeedData>;
272#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
273#[serde(rename_all = "camelCase")]
274pub struct SavedFeedsPrefData {
275    pub pinned: Vec<String>,
276    pub saved: Vec<String>,
277    #[serde(skip_serializing_if = "core::option::Option::is_none")]
278    pub timeline_index: core::option::Option<i64>,
279}
280pub type SavedFeedsPref = crate::types::Object<SavedFeedsPrefData>;
281#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
282#[serde(rename_all = "camelCase")]
283pub struct SavedFeedsPrefV2Data {
284    pub items: Vec<crate::app::bsky::actor::defs::SavedFeed>,
285}
286pub type SavedFeedsPrefV2 = crate::types::Object<SavedFeedsPrefV2Data>;
287#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
288#[serde(rename_all = "camelCase")]
289pub struct ThreadViewPrefData {
290    ///Show followed users at the top of all replies.
291    #[serde(skip_serializing_if = "core::option::Option::is_none")]
292    pub prioritize_followed_users: core::option::Option<bool>,
293    ///Sorting mode for threads.
294    #[serde(skip_serializing_if = "core::option::Option::is_none")]
295    pub sort: core::option::Option<String>,
296}
297pub type ThreadViewPref = crate::types::Object<ThreadViewPrefData>;
298///Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
299#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
300#[serde(rename_all = "camelCase")]
301pub struct ViewerStateData {
302    #[serde(skip_serializing_if = "core::option::Option::is_none")]
303    pub blocked_by: core::option::Option<bool>,
304    #[serde(skip_serializing_if = "core::option::Option::is_none")]
305    pub blocking: core::option::Option<String>,
306    #[serde(skip_serializing_if = "core::option::Option::is_none")]
307    pub blocking_by_list: core::option::Option<
308        crate::app::bsky::graph::defs::ListViewBasic,
309    >,
310    #[serde(skip_serializing_if = "core::option::Option::is_none")]
311    pub followed_by: core::option::Option<String>,
312    #[serde(skip_serializing_if = "core::option::Option::is_none")]
313    pub following: core::option::Option<String>,
314    #[serde(skip_serializing_if = "core::option::Option::is_none")]
315    pub known_followers: core::option::Option<KnownFollowers>,
316    #[serde(skip_serializing_if = "core::option::Option::is_none")]
317    pub muted: core::option::Option<bool>,
318    #[serde(skip_serializing_if = "core::option::Option::is_none")]
319    pub muted_by_list: core::option::Option<
320        crate::app::bsky::graph::defs::ListViewBasic,
321    >,
322}
323pub type ViewerState = crate::types::Object<ViewerStateData>;
324#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
325#[serde(tag = "$type")]
326pub enum PostInteractionSettingsPrefPostgateEmbeddingRulesItem {
327    #[serde(rename = "app.bsky.feed.postgate#disableRule")]
328    AppBskyFeedPostgateDisableRule(Box<crate::app::bsky::feed::postgate::DisableRule>),
329}
330#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
331#[serde(tag = "$type")]
332pub enum PostInteractionSettingsPrefThreadgateAllowRulesItem {
333    #[serde(rename = "app.bsky.feed.threadgate#mentionRule")]
334    AppBskyFeedThreadgateMentionRule(
335        Box<crate::app::bsky::feed::threadgate::MentionRule>,
336    ),
337    #[serde(rename = "app.bsky.feed.threadgate#followerRule")]
338    AppBskyFeedThreadgateFollowerRule(
339        Box<crate::app::bsky::feed::threadgate::FollowerRule>,
340    ),
341    #[serde(rename = "app.bsky.feed.threadgate#followingRule")]
342    AppBskyFeedThreadgateFollowingRule(
343        Box<crate::app::bsky::feed::threadgate::FollowingRule>,
344    ),
345    #[serde(rename = "app.bsky.feed.threadgate#listRule")]
346    AppBskyFeedThreadgateListRule(Box<crate::app::bsky::feed::threadgate::ListRule>),
347}
348#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
349#[serde(tag = "$type")]
350pub enum PreferencesItem {
351    #[serde(rename = "app.bsky.actor.defs#adultContentPref")]
352    AdultContentPref(Box<AdultContentPref>),
353    #[serde(rename = "app.bsky.actor.defs#contentLabelPref")]
354    ContentLabelPref(Box<ContentLabelPref>),
355    #[serde(rename = "app.bsky.actor.defs#savedFeedsPref")]
356    SavedFeedsPref(Box<SavedFeedsPref>),
357    #[serde(rename = "app.bsky.actor.defs#savedFeedsPrefV2")]
358    SavedFeedsPrefV2(Box<SavedFeedsPrefV2>),
359    #[serde(rename = "app.bsky.actor.defs#personalDetailsPref")]
360    PersonalDetailsPref(Box<PersonalDetailsPref>),
361    #[serde(rename = "app.bsky.actor.defs#feedViewPref")]
362    FeedViewPref(Box<FeedViewPref>),
363    #[serde(rename = "app.bsky.actor.defs#threadViewPref")]
364    ThreadViewPref(Box<ThreadViewPref>),
365    #[serde(rename = "app.bsky.actor.defs#interestsPref")]
366    InterestsPref(Box<InterestsPref>),
367    #[serde(rename = "app.bsky.actor.defs#mutedWordsPref")]
368    MutedWordsPref(Box<MutedWordsPref>),
369    #[serde(rename = "app.bsky.actor.defs#hiddenPostsPref")]
370    HiddenPostsPref(Box<HiddenPostsPref>),
371    #[serde(rename = "app.bsky.actor.defs#bskyAppStatePref")]
372    BskyAppStatePref(Box<BskyAppStatePref>),
373    #[serde(rename = "app.bsky.actor.defs#labelersPref")]
374    LabelersPref(Box<LabelersPref>),
375    #[serde(rename = "app.bsky.actor.defs#postInteractionSettingsPref")]
376    PostInteractionSettingsPref(Box<PostInteractionSettingsPref>),
377}