#[allow(unused_imports)]
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr};
#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::deps::smol_str::SmolStr;
use jacquard_common::types::collection::{Collection, RecordError};
use jacquard_common::types::string::{AtUri, Cid, Datetime};
use jacquard_common::types::uri::{RecordUri, UriError};
use jacquard_common::types::value::Data;
use jacquard_common::xrpc::XrpcResp;
use jacquard_derive::{IntoStatic, lexicon};
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;
use crate::net_anisota::settings;
#[allow(unused_imports)]
use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct AnimationTiming<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub card_advance: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub card_flip: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub card_stack_entrance: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub corner_elements: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub fullscreen_transitions: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub modals: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub overall: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub page_transitions: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub thread_transitions: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ui_transitions: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct BatchNotificationTypes<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub follows: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub likes: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub mentions: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub quotes: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub replies: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reposts: Option<bool>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct BehaviorSettings<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub animation_timing: Option<settings::AnimationTiming<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub anisota_only_mode: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_enabled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub batch_notification_types: Option<settings::BatchNotificationTypes<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub batch_notifications: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub bypass_detached_quotes: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub combine_relationship_and_follower_filters: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub confirm_deletes: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub confirm_draft_saves: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub default_home_page: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub default_post_target: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub feed_cache_length: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_by_follower_ratio: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_notification_types: Option<settings::FilterNotificationTypes<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_notifications_by_followers: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_notifications_by_relationship: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_relationship_types: Option<settings::FilterRelationshipTypes<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub force_chronological_sort: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub fullscreen_behavior: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub hide_interacted_posts: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub hide_notification_count: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub hide_read_posts: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub hide_reposts: Option<settings::HideReposts<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub highlight_by_follower_ratio: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub highlight_max_follower_count: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub highlight_min_follower_count: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub highlight_min_follower_ratio: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub highlight_notification_types: Option<settings::HighlightNotificationTypes<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub highlight_notifications: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub include_reply_engagement: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub keyboard_shortcuts: Option<settings::KeyboardShortcuts<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub max_follower_count: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub min_follower_count: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub min_follower_ratio: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub moderation_settings: Option<settings::ModerationSettings<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub post_drafts: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reverse_feed_order: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_blocked_posts: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_new_highlights_section: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_notification_sections: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_older_section: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_rarity_in_header: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_recently_read_section: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_thread_suggestion: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_unread_section: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub soundscape: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub stats_visible_sections: Option<settings::StatsVisibleSections<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub text_only_mode: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub track_read_posts: Option<bool>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct ControlSettings<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub account_list: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub back: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub comment_button: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub copy_author_did: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub copy_button: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub copy_post_link: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub copy_post_text: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub delete: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub engage_button: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub feed_switcher: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub fetch: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub flip: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub forward: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub fullscreen: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub leaflet_publications: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub like: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub list: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub multi_engage_button: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub multi_repost_button: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub position_button: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub post_list: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub quick_access: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub quote: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub relationship_button: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reply: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub repost: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub shuffle: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub text_only_mode: Option<bool>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct CornerElements<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub bottom_left: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub bottom_right: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub top_left: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub top_right: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct FilterNotificationTypes<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub follows: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub likes: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub mentions: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub quotes: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub replies: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reposts: Option<bool>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct FilterRelationshipTypes<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub followers: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub following: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub mutuals: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub non_mutuals: Option<bool>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct HideReposts<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub feed: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub profile: Option<bool>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct HighlightNotificationTypes<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub follows: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub likes: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub mentions: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub quotes: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub replies: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reposts: Option<bool>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct KeyboardShortcuts<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub composer: Option<settings::KeyboardShortcutsComposer<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub global: Option<settings::KeyboardShortcutsGlobal<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub modals: Option<settings::KeyboardShortcutsModals<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub navigation: Option<settings::KeyboardShortcutsNavigation<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub post_interactions: Option<settings::KeyboardShortcutsPostInteractions<S>>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct KeyboardShortcutsComposer<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub publish: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct KeyboardShortcutsGlobal<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub collection: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub feed: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub inventory: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub profile: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct KeyboardShortcutsModals<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub keyboard_help: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub notifications: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub post_composer: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub stats: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub touch_menu: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct KeyboardShortcutsNavigation<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub arrow_down: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub arrow_left: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub arrow_right: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub arrow_up: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub escape: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct KeyboardShortcutsPostInteractions<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub like: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub quote: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reply: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub repost: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
rename = "net.anisota.settings",
tag = "$type",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct Settings<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub behavior_settings: Option<settings::BehaviorSettings<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub control_order: Option<Vec<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub control_settings: Option<settings::ControlSettings<S>>,
pub created_at: Datetime,
#[serde(skip_serializing_if = "Option::is_none")]
pub theme: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ui_settings: Option<settings::UiSettings<S>>,
pub updated_at: Datetime,
pub version: i64,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct SettingsGetRecordOutput<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub cid: Option<Cid<S>>,
pub uri: AtUri<S>,
pub value: Settings<S>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct ModerationSettings<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub muted_accounts_handling: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub muted_content_handling: Option<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct StatsVisibleSections<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub activity: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub engagement: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub progress: Option<bool>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct UiSettings<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub corner_elements: Option<settings::CornerElements<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub font_size: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub post_card_primary_slot: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub post_card_secondary_slot: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_card_primary_slot: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_card_secondary_slot: Option<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_post_card_at_symbol: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_post_card_avatar: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_post_card_display_name: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_post_card_footer: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_post_card_handle: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_post_card_header: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_post_count: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_post_read_indicator: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_at_symbol: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_blocked: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_blocking: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_cancelled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_cancelling: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_card_avatar: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_card_footer: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_card_header: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_collections: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_display_name: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_followers: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_following: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_handle: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_lexicons: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_listed: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_listing: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_lists: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_posts: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_pronouns: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_verified: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_verifying: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_profile_website: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_rarity_indicator: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_timestamp: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub show_username: Option<bool>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
impl<S: BosStr> Settings<S> {
pub fn uri(uri: S) -> Result<RecordUri<S, SettingsRecord>, UriError> {
RecordUri::try_from_uri(AtUri::new(uri)?)
}
}
impl<S: BosStr> LexiconSchema for AnimationTiming<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"animationTiming"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.card_advance {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("card_advance"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.card_flip {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("card_flip"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.card_stack_entrance {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("card_stack_entrance"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.corner_elements {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("corner_elements"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.fullscreen_transitions {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("fullscreen_transitions"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.modals {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("modals"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.overall {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("overall"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.page_transitions {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("page_transitions"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.thread_transitions {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("thread_transitions"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.ui_transitions {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("ui_transitions"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for BatchNotificationTypes<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"batchNotificationTypes"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for BehaviorSettings<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"behaviorSettings"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.feed_cache_length {
if *value < 1i64 {
return Err(ConstraintError::Minimum {
path: ValidationPath::from_field("feed_cache_length"),
min: 1i64,
actual: *value,
});
}
}
if let Some(ref value) = self.highlight_min_follower_count {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 20usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("highlight_min_follower_count"),
max: 20usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.highlight_min_follower_ratio {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 20usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("highlight_min_follower_ratio"),
max: 20usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.min_follower_count {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 20usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("min_follower_count"),
max: 20usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.min_follower_ratio {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 20usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("min_follower_ratio"),
max: 20usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ControlSettings<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"controlSettings"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for CornerElements<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"cornerElements"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for FilterNotificationTypes<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"filterNotificationTypes"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for FilterRelationshipTypes<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"filterRelationshipTypes"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for HideReposts<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"hideReposts"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for HighlightNotificationTypes<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"highlightNotificationTypes"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for KeyboardShortcuts<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"keyboardShortcuts"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for KeyboardShortcutsComposer<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"keyboardShortcutsComposer"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.publish {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("publish"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for KeyboardShortcutsGlobal<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"keyboardShortcutsGlobal"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.collection {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("collection"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.feed {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("feed"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.inventory {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("inventory"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.profile {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("profile"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for KeyboardShortcutsModals<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"keyboardShortcutsModals"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.keyboard_help {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("keyboard_help"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.notifications {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("notifications"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.post_composer {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("post_composer"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.stats {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("stats"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.touch_menu {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("touch_menu"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for KeyboardShortcutsNavigation<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"keyboardShortcutsNavigation"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.arrow_down {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("arrow_down"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.arrow_left {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("arrow_left"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.arrow_right {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("arrow_right"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.arrow_up {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("arrow_up"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.escape {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("escape"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for KeyboardShortcutsPostInteractions<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"keyboardShortcutsPostInteractions"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.like {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("like"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.quote {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("quote"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.reply {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("reply"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.repost {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("repost"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct SettingsRecord;
impl XrpcResp for SettingsRecord {
const NSID: &'static str = "net.anisota.settings";
const ENCODING: &'static str = "application/json";
type Output<S: BosStr> = SettingsGetRecordOutput<S>;
type Err = RecordError;
}
impl<S: BosStr> From<SettingsGetRecordOutput<S>> for Settings<S> {
fn from(output: SettingsGetRecordOutput<S>) -> Self {
output.value
}
}
impl<S: BosStr> Collection for Settings<S> {
const NSID: &'static str = "net.anisota.settings";
type Record = SettingsRecord;
}
impl Collection for SettingsRecord {
const NSID: &'static str = "net.anisota.settings";
type Record = SettingsRecord;
}
impl<S: BosStr> LexiconSchema for Settings<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"main"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
{
let value = &self.version;
if *value < 1i64 {
return Err(ConstraintError::Minimum {
path: ValidationPath::from_field("version"),
min: 1i64,
actual: *value,
});
}
}
Ok(())
}
}
impl<S: BosStr> LexiconSchema for ModerationSettings<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"moderationSettings"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for StatsVisibleSections<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"statsVisibleSections"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<S: BosStr> LexiconSchema for UiSettings<S> {
fn nsid() -> &'static str {
"net.anisota.settings"
}
fn def_name() -> &'static str {
"uiSettings"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_net_anisota_settings()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.font_size {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("font_size"),
max: 10usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
fn lexicon_doc_net_anisota_settings() -> LexiconDoc<'static> {
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
use jacquard_lexicon::lexicon::*;
LexiconDoc {
lexicon: Lexicon::Lexicon1,
id: CowStr::new_static("net.anisota.settings"),
defs: {
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("animationTiming"),
LexUserType::Object(LexObject {
description: Some(
CowStr::new_static(
"Animation timing and speed settings for various UI animations",
),
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("cardAdvance"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Card advance exit to right and entrance back in from right (stored as string)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("cardFlip"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Card flip animation between front and back (stored as string)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("cardStackEntrance"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Card stack animate in entrance from the top of screen (stored as string)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("cornerElements"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Staggered interactive corner element entrance animation (stored as string)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("fullscreenTransitions"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Card stack height expansion and shrinking when entering/exiting fullscreen (stored as string)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("modals"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Modal entrance and exit animations (stored as string)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("overall"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Master speed multiplier that affects all animations (stored as string, e.g. '1.0' = normal speed)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("pageTransitions"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Page transitions and navigation animations (stored as string)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("threadTransitions"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Thread train sliding, entering, and exiting animations (stored as string)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uiTransitions"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Control row and feed subtitle fade in/out animations (stored as string)",
),
),
max_length: Some(10usize),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("batchNotificationTypes"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("follows"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("likes"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("mentions"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("quotes"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("replies"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("reposts"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("behaviorSettings"),
LexUserType::Object(LexObject {
description: Some(
CowStr::new_static("App behavior and functionality settings"),
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("animationTiming"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#animationTiming"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("anisotaOnlyMode"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("audioEnabled"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("batchNotificationTypes"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#batchNotificationTypes"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("batchNotifications"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("bypassDetachedQuotes"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("combineRelationshipAndFollowerFilters"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("confirmDeletes"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("confirmDraftSaves"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("defaultHomePage"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Default page to show on app load"),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("defaultPostTarget"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Default publishing target for new posts",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("feedCacheLength"),
LexObjectProperty::Integer(LexInteger {
minimum: Some(1i64),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("filterByFollowerRatio"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("filterNotificationTypes"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#filterNotificationTypes"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("filterNotificationsByFollowers"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("filterNotificationsByRelationship"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("filterRelationshipTypes"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#filterRelationshipTypes"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("forceChronologicalSort"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("fullscreenBehavior"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Fullscreen behavior mode: fullscreen (show control row), immersive (hide all UI), or cycle (cycle through states)",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hideInteractedPosts"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hideNotificationCount"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hideReadPosts"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hideReposts"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#hideReposts"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("highlightByFollowerRatio"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("highlightMaxFollowerCount"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("highlightMinFollowerCount"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Minimum follower count for notification highlighting (stored as string or integer)",
),
),
max_length: Some(20usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("highlightMinFollowerRatio"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Minimum follower-to-following ratio for highlighting (stored as string)",
),
),
max_length: Some(20usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("highlightNotificationTypes"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#highlightNotificationTypes"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("highlightNotifications"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("includeReplyEngagement"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("keyboardShortcuts"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#keyboardShortcuts"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("maxFollowerCount"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("minFollowerCount"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Minimum follower count for notification filtering (stored as string)",
),
),
max_length: Some(20usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("minFollowerRatio"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Minimum follower ratio for filtering (stored as string)",
),
),
max_length: Some(20usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("moderationSettings"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#moderationSettings"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("postDrafts"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("reverseFeedOrder"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showBlockedPosts"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showNewHighlightsSection"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showNotificationSections"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showOlderSection"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showRarityInHeader"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showRecentlyReadSection"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showThreadSuggestion"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showUnreadSection"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("soundscape"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Selected background audio soundscape"),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("statsVisibleSections"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#statsVisibleSections"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("textOnlyMode"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("trackReadPosts"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("controlSettings"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("Control button visibility settings")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("accountList"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("back"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("commentButton"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("copyAuthorDID"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("copyButton"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("copyPostLink"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("copyPostText"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("delete"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("engageButton"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("feedSwitcher"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("fetch"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("flip"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("forward"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("fullscreen"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("leafletPublications"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("like"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("list"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("multiEngageButton"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("multiRepostButton"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("positionButton"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("postList"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("quickAccess"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("quote"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("relationshipButton"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("reply"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("repost"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("shuffle"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("textOnlyMode"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("cornerElements"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("Corner element positioning settings")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("bottomLeft"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Element to show in bottom left corner",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("bottomRight"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Element to show in bottom right corner",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("topLeft"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Element to show in top left corner",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("topRight"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Element to show in top right corner",
)),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("filterNotificationTypes"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("follows"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("likes"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("mentions"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("quotes"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("replies"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("reposts"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("filterRelationshipTypes"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("followers"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("following"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("mutuals"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("nonMutuals"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hideReposts"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("feed"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("profile"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("highlightNotificationTypes"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("follows"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("likes"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("mentions"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("quotes"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("replies"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("reposts"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("keyboardShortcuts"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("Keyboard shortcut configuration")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("composer"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#keyboardShortcutsComposer"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("global"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#keyboardShortcutsGlobal"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("modals"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#keyboardShortcutsModals"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("navigation"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#keyboardShortcutsNavigation"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("postInteractions"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#keyboardShortcutsPostInteractions"),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("keyboardShortcutsComposer"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("Post composer keyboard shortcuts")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("publish"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Publish post (e.g., ctrl+enter)",
)),
max_length: Some(50usize),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("keyboardShortcutsGlobal"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("Global navigation keyboard shortcuts")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("collection"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Navigate to collection")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("feed"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Navigate to feed")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("inventory"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Navigate to inventory")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("profile"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Navigate to profile")),
max_length: Some(50usize),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("keyboardShortcutsModals"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("Modal keyboard shortcuts")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("keyboardHelp"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Show keyboard shortcuts help",
)),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("notifications"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Open notifications")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("postComposer"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Open post composer")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("stats"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Open stats modal")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("touchMenu"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Open touch menu")),
max_length: Some(50usize),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("keyboardShortcutsNavigation"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("Navigation keyboard shortcuts")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("arrowDown"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Scroll down or next item")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("arrowLeft"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Go back to previous card")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("arrowRight"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Advance to next card")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("arrowUp"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Scroll up or previous item")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("escape"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Exit fullscreen or close modals",
)),
max_length: Some(50usize),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("keyboardShortcutsPostInteractions"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("Post interaction keyboard shortcuts")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("like"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Like current post")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("quote"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Quote current post")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("reply"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Reply to current post")),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("repost"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Repost current post")),
max_length: Some(50usize),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("main"),
LexUserType::Record(LexRecord {
description: Some(
CowStr::new_static(
"User settings for the Anisota app, synchronized across devices via ATProto",
),
),
key: Some(CowStr::new_static("literal:settings")),
record: LexRecordRecord::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("version"),
SmolStr::new_static("createdAt"),
SmolStr::new_static("updatedAt")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("behaviorSettings"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#behaviorSettings"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("controlOrder"),
LexObjectProperty::Array(LexArray {
description: Some(
CowStr::new_static("Order of control buttons"),
),
items: LexArrayItem::String(LexString {
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("controlSettings"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#controlSettings"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("createdAt"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"When the settings record was first created",
),
),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("theme"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Selected color theme"),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uiSettings"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#uiSettings"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("updatedAt"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("When the settings were last updated"),
),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("version"),
LexObjectProperty::Integer(LexInteger {
minimum: Some(1i64),
..Default::default()
}),
);
map
},
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("moderationSettings"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static(
"Content moderation and filtering settings",
)),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("mutedAccountsHandling"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"How to handle posts from muted accounts",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("mutedContentHandling"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"How to handle posts containing muted words or phrases",
)),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("statsVisibleSections"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("activity"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("engagement"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("progress"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uiSettings"),
LexUserType::Object(LexObject {
description: Some(CowStr::new_static("UI visibility and behavior settings")),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("cornerElements"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#cornerElements"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("fontSize"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Font size scale (0.8 = 80%, 1.0 = 100% default, 1.2 = 120%)",
)),
max_length: Some(10usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("postCardPrimarySlot"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Primary name slot for post cards",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("postCardSecondarySlot"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Secondary name slot for post cards",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("profileCardPrimarySlot"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Primary name slot for profile cards",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("profileCardSecondarySlot"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static(
"Secondary name slot for profile cards",
)),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showPostCardAtSymbol"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showPostCardAvatar"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showPostCardDisplayName"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showPostCardFooter"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showPostCardHandle"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showPostCardHeader"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showPostCount"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showPostReadIndicator"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileAtSymbol"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileBlocked"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileBlocking"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileCancelled"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileCancelling"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileCardAvatar"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileCardFooter"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileCardHeader"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileCollections"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileDisplayName"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileFollowers"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileFollowing"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileHandle"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileLexicons"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileListed"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileListing"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileLists"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfilePosts"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfilePronouns"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileVerified"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileVerifying"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showProfileWebsite"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showRarityIndicator"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showTimestamp"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("showUsername"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map
},
..Default::default()
}
}
pub mod settings_state {
pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type UpdatedAt;
type CreatedAt;
type Version;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type UpdatedAt = Unset;
type CreatedAt = Unset;
type Version = Unset;
}
pub struct SetUpdatedAt<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUpdatedAt<St> {}
impl<St: State> State for SetUpdatedAt<St> {
type UpdatedAt = Set<members::updated_at>;
type CreatedAt = St::CreatedAt;
type Version = St::Version;
}
pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
impl<St: State> State for SetCreatedAt<St> {
type UpdatedAt = St::UpdatedAt;
type CreatedAt = Set<members::created_at>;
type Version = St::Version;
}
pub struct SetVersion<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetVersion<St> {}
impl<St: State> State for SetVersion<St> {
type UpdatedAt = St::UpdatedAt;
type CreatedAt = St::CreatedAt;
type Version = Set<members::version>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct updated_at(());
pub struct created_at(());
pub struct version(());
}
}
pub struct SettingsBuilder<S: BosStr, St: settings_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<settings::BehaviorSettings<S>>,
Option<Vec<S>>,
Option<settings::ControlSettings<S>>,
Option<Datetime>,
Option<S>,
Option<settings::UiSettings<S>>,
Option<Datetime>,
Option<i64>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> Settings<S> {
pub fn new() -> SettingsBuilder<S, settings_state::Empty> {
SettingsBuilder::new()
}
}
impl<S: BosStr> SettingsBuilder<S, settings_state::Empty> {
pub fn new() -> Self {
SettingsBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: settings_state::State> SettingsBuilder<S, St> {
pub fn behavior_settings(
mut self,
value: impl Into<Option<settings::BehaviorSettings<S>>>,
) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_behavior_settings(mut self, value: Option<settings::BehaviorSettings<S>>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St: settings_state::State> SettingsBuilder<S, St> {
pub fn control_order(mut self, value: impl Into<Option<Vec<S>>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_control_order(mut self, value: Option<Vec<S>>) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St: settings_state::State> SettingsBuilder<S, St> {
pub fn control_settings(
mut self,
value: impl Into<Option<settings::ControlSettings<S>>>,
) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_control_settings(mut self, value: Option<settings::ControlSettings<S>>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St> SettingsBuilder<S, St>
where
St: settings_state::State,
St::CreatedAt: settings_state::IsUnset,
{
pub fn created_at(
mut self,
value: impl Into<Datetime>,
) -> SettingsBuilder<S, settings_state::SetCreatedAt<St>> {
self._fields.3 = Option::Some(value.into());
SettingsBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: settings_state::State> SettingsBuilder<S, St> {
pub fn theme(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.4 = value.into();
self
}
pub fn maybe_theme(mut self, value: Option<S>) -> Self {
self._fields.4 = value;
self
}
}
impl<S: BosStr, St: settings_state::State> SettingsBuilder<S, St> {
pub fn ui_settings(mut self, value: impl Into<Option<settings::UiSettings<S>>>) -> Self {
self._fields.5 = value.into();
self
}
pub fn maybe_ui_settings(mut self, value: Option<settings::UiSettings<S>>) -> Self {
self._fields.5 = value;
self
}
}
impl<S: BosStr, St> SettingsBuilder<S, St>
where
St: settings_state::State,
St::UpdatedAt: settings_state::IsUnset,
{
pub fn updated_at(
mut self,
value: impl Into<Datetime>,
) -> SettingsBuilder<S, settings_state::SetUpdatedAt<St>> {
self._fields.6 = Option::Some(value.into());
SettingsBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> SettingsBuilder<S, St>
where
St: settings_state::State,
St::Version: settings_state::IsUnset,
{
pub fn version(
mut self,
value: impl Into<i64>,
) -> SettingsBuilder<S, settings_state::SetVersion<St>> {
self._fields.7 = Option::Some(value.into());
SettingsBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> SettingsBuilder<S, St>
where
St: settings_state::State,
St::UpdatedAt: settings_state::IsSet,
St::CreatedAt: settings_state::IsSet,
St::Version: settings_state::IsSet,
{
pub fn build(self) -> Settings<S> {
Settings {
behavior_settings: self._fields.0,
control_order: self._fields.1,
control_settings: self._fields.2,
created_at: self._fields.3.unwrap(),
theme: self._fields.4,
ui_settings: self._fields.5,
updated_at: self._fields.6.unwrap(),
version: self._fields.7.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> Settings<S> {
Settings {
behavior_settings: self._fields.0,
control_order: self._fields.1,
control_settings: self._fields.2,
created_at: self._fields.3.unwrap(),
theme: self._fields.4,
ui_settings: self._fields.5,
updated_at: self._fields.6.unwrap(),
version: self._fields.7.unwrap(),
extra_data: Some(extra_data),
}
}
}