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 verification: core::option::Option<VerificationState>,
205    #[serde(skip_serializing_if = "core::option::Option::is_none")]
206    pub viewer: core::option::Option<ViewerState>,
207}
208pub type ProfileView = crate::types::Object<ProfileViewData>;
209#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
210#[serde(rename_all = "camelCase")]
211pub struct ProfileViewBasicData {
212    #[serde(skip_serializing_if = "core::option::Option::is_none")]
213    pub associated: core::option::Option<ProfileAssociated>,
214    #[serde(skip_serializing_if = "core::option::Option::is_none")]
215    pub avatar: core::option::Option<String>,
216    #[serde(skip_serializing_if = "core::option::Option::is_none")]
217    pub created_at: core::option::Option<crate::types::string::Datetime>,
218    pub did: crate::types::string::Did,
219    #[serde(skip_serializing_if = "core::option::Option::is_none")]
220    pub display_name: core::option::Option<String>,
221    pub handle: crate::types::string::Handle,
222    #[serde(skip_serializing_if = "core::option::Option::is_none")]
223    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
224    #[serde(skip_serializing_if = "core::option::Option::is_none")]
225    pub verification: core::option::Option<VerificationState>,
226    #[serde(skip_serializing_if = "core::option::Option::is_none")]
227    pub viewer: core::option::Option<ViewerState>,
228}
229pub type ProfileViewBasic = crate::types::Object<ProfileViewBasicData>;
230#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
231#[serde(rename_all = "camelCase")]
232pub struct ProfileViewDetailedData {
233    #[serde(skip_serializing_if = "core::option::Option::is_none")]
234    pub associated: core::option::Option<ProfileAssociated>,
235    #[serde(skip_serializing_if = "core::option::Option::is_none")]
236    pub avatar: core::option::Option<String>,
237    #[serde(skip_serializing_if = "core::option::Option::is_none")]
238    pub banner: core::option::Option<String>,
239    #[serde(skip_serializing_if = "core::option::Option::is_none")]
240    pub created_at: core::option::Option<crate::types::string::Datetime>,
241    #[serde(skip_serializing_if = "core::option::Option::is_none")]
242    pub description: core::option::Option<String>,
243    pub did: crate::types::string::Did,
244    #[serde(skip_serializing_if = "core::option::Option::is_none")]
245    pub display_name: core::option::Option<String>,
246    #[serde(skip_serializing_if = "core::option::Option::is_none")]
247    pub followers_count: core::option::Option<i64>,
248    #[serde(skip_serializing_if = "core::option::Option::is_none")]
249    pub follows_count: core::option::Option<i64>,
250    pub handle: crate::types::string::Handle,
251    #[serde(skip_serializing_if = "core::option::Option::is_none")]
252    pub indexed_at: core::option::Option<crate::types::string::Datetime>,
253    #[serde(skip_serializing_if = "core::option::Option::is_none")]
254    pub joined_via_starter_pack: core::option::Option<
255        crate::app::bsky::graph::defs::StarterPackViewBasic,
256    >,
257    #[serde(skip_serializing_if = "core::option::Option::is_none")]
258    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
259    #[serde(skip_serializing_if = "core::option::Option::is_none")]
260    pub pinned_post: core::option::Option<crate::com::atproto::repo::strong_ref::Main>,
261    #[serde(skip_serializing_if = "core::option::Option::is_none")]
262    pub posts_count: core::option::Option<i64>,
263    #[serde(skip_serializing_if = "core::option::Option::is_none")]
264    pub verification: core::option::Option<VerificationState>,
265    #[serde(skip_serializing_if = "core::option::Option::is_none")]
266    pub viewer: core::option::Option<ViewerState>,
267}
268pub type ProfileViewDetailed = crate::types::Object<ProfileViewDetailedData>;
269#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
270#[serde(rename_all = "camelCase")]
271pub struct SavedFeedData {
272    pub id: String,
273    pub pinned: bool,
274    pub r#type: String,
275    pub value: String,
276}
277pub type SavedFeed = crate::types::Object<SavedFeedData>;
278#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
279#[serde(rename_all = "camelCase")]
280pub struct SavedFeedsPrefData {
281    pub pinned: Vec<String>,
282    pub saved: Vec<String>,
283    #[serde(skip_serializing_if = "core::option::Option::is_none")]
284    pub timeline_index: core::option::Option<i64>,
285}
286pub type SavedFeedsPref = crate::types::Object<SavedFeedsPrefData>;
287#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
288#[serde(rename_all = "camelCase")]
289pub struct SavedFeedsPrefV2Data {
290    pub items: Vec<crate::app::bsky::actor::defs::SavedFeed>,
291}
292pub type SavedFeedsPrefV2 = crate::types::Object<SavedFeedsPrefV2Data>;
293#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
294#[serde(rename_all = "camelCase")]
295pub struct ThreadViewPrefData {
296    ///Show followed users at the top of all replies.
297    #[serde(skip_serializing_if = "core::option::Option::is_none")]
298    pub prioritize_followed_users: core::option::Option<bool>,
299    ///Sorting mode for threads.
300    #[serde(skip_serializing_if = "core::option::Option::is_none")]
301    pub sort: core::option::Option<String>,
302}
303pub type ThreadViewPref = crate::types::Object<ThreadViewPrefData>;
304///Preferences for how verified accounts appear in the app.
305#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
306#[serde(rename_all = "camelCase")]
307pub struct VerificationPrefsData {
308    ///Hide the blue check badges for verified accounts and trusted verifiers.
309    #[serde(skip_serializing_if = "core::option::Option::is_none")]
310    pub hide_badges: core::option::Option<bool>,
311}
312pub type VerificationPrefs = crate::types::Object<VerificationPrefsData>;
313///Represents the verification information about the user this object is attached to.
314#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
315#[serde(rename_all = "camelCase")]
316pub struct VerificationStateData {
317    ///The user's status as a trusted verifier.
318    pub trusted_verifier_status: String,
319    ///All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.
320    pub verifications: Vec<VerificationView>,
321    ///The user's status as a verified account.
322    pub verified_status: String,
323}
324pub type VerificationState = crate::types::Object<VerificationStateData>;
325///An individual verification for an associated subject.
326#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
327#[serde(rename_all = "camelCase")]
328pub struct VerificationViewData {
329    ///Timestamp when the verification was created.
330    pub created_at: crate::types::string::Datetime,
331    ///True if the verification passes validation, otherwise false.
332    pub is_valid: bool,
333    ///The user who issued this verification.
334    pub issuer: crate::types::string::Did,
335    ///The AT-URI of the verification record.
336    pub uri: String,
337}
338pub type VerificationView = crate::types::Object<VerificationViewData>;
339///Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
340#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
341#[serde(rename_all = "camelCase")]
342pub struct ViewerStateData {
343    #[serde(skip_serializing_if = "core::option::Option::is_none")]
344    pub blocked_by: core::option::Option<bool>,
345    #[serde(skip_serializing_if = "core::option::Option::is_none")]
346    pub blocking: core::option::Option<String>,
347    #[serde(skip_serializing_if = "core::option::Option::is_none")]
348    pub blocking_by_list: core::option::Option<
349        crate::app::bsky::graph::defs::ListViewBasic,
350    >,
351    #[serde(skip_serializing_if = "core::option::Option::is_none")]
352    pub followed_by: core::option::Option<String>,
353    #[serde(skip_serializing_if = "core::option::Option::is_none")]
354    pub following: core::option::Option<String>,
355    #[serde(skip_serializing_if = "core::option::Option::is_none")]
356    pub known_followers: core::option::Option<KnownFollowers>,
357    #[serde(skip_serializing_if = "core::option::Option::is_none")]
358    pub muted: core::option::Option<bool>,
359    #[serde(skip_serializing_if = "core::option::Option::is_none")]
360    pub muted_by_list: core::option::Option<
361        crate::app::bsky::graph::defs::ListViewBasic,
362    >,
363}
364pub type ViewerState = crate::types::Object<ViewerStateData>;
365#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
366#[serde(tag = "$type")]
367pub enum PostInteractionSettingsPrefPostgateEmbeddingRulesItem {
368    #[serde(rename = "app.bsky.feed.postgate#disableRule")]
369    AppBskyFeedPostgateDisableRule(Box<crate::app::bsky::feed::postgate::DisableRule>),
370}
371#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
372#[serde(tag = "$type")]
373pub enum PostInteractionSettingsPrefThreadgateAllowRulesItem {
374    #[serde(rename = "app.bsky.feed.threadgate#mentionRule")]
375    AppBskyFeedThreadgateMentionRule(
376        Box<crate::app::bsky::feed::threadgate::MentionRule>,
377    ),
378    #[serde(rename = "app.bsky.feed.threadgate#followerRule")]
379    AppBskyFeedThreadgateFollowerRule(
380        Box<crate::app::bsky::feed::threadgate::FollowerRule>,
381    ),
382    #[serde(rename = "app.bsky.feed.threadgate#followingRule")]
383    AppBskyFeedThreadgateFollowingRule(
384        Box<crate::app::bsky::feed::threadgate::FollowingRule>,
385    ),
386    #[serde(rename = "app.bsky.feed.threadgate#listRule")]
387    AppBskyFeedThreadgateListRule(Box<crate::app::bsky::feed::threadgate::ListRule>),
388}
389#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
390#[serde(tag = "$type")]
391pub enum PreferencesItem {
392    #[serde(rename = "app.bsky.actor.defs#adultContentPref")]
393    AdultContentPref(Box<AdultContentPref>),
394    #[serde(rename = "app.bsky.actor.defs#contentLabelPref")]
395    ContentLabelPref(Box<ContentLabelPref>),
396    #[serde(rename = "app.bsky.actor.defs#savedFeedsPref")]
397    SavedFeedsPref(Box<SavedFeedsPref>),
398    #[serde(rename = "app.bsky.actor.defs#savedFeedsPrefV2")]
399    SavedFeedsPrefV2(Box<SavedFeedsPrefV2>),
400    #[serde(rename = "app.bsky.actor.defs#personalDetailsPref")]
401    PersonalDetailsPref(Box<PersonalDetailsPref>),
402    #[serde(rename = "app.bsky.actor.defs#feedViewPref")]
403    FeedViewPref(Box<FeedViewPref>),
404    #[serde(rename = "app.bsky.actor.defs#threadViewPref")]
405    ThreadViewPref(Box<ThreadViewPref>),
406    #[serde(rename = "app.bsky.actor.defs#interestsPref")]
407    InterestsPref(Box<InterestsPref>),
408    #[serde(rename = "app.bsky.actor.defs#mutedWordsPref")]
409    MutedWordsPref(Box<MutedWordsPref>),
410    #[serde(rename = "app.bsky.actor.defs#hiddenPostsPref")]
411    HiddenPostsPref(Box<HiddenPostsPref>),
412    #[serde(rename = "app.bsky.actor.defs#bskyAppStatePref")]
413    BskyAppStatePref(Box<BskyAppStatePref>),
414    #[serde(rename = "app.bsky.actor.defs#labelersPref")]
415    LabelersPref(Box<LabelersPref>),
416    #[serde(rename = "app.bsky.actor.defs#postInteractionSettingsPref")]
417    PostInteractionSettingsPref(Box<PostInteractionSettingsPref>),
418    #[serde(rename = "app.bsky.actor.defs#verificationPrefs")]
419    VerificationPrefs(Box<VerificationPrefs>),
420}