1#[allow(unused_imports)]
9use alloc::collections::BTreeMap;
10
11#[allow(unused_imports)]
12use core::marker::PhantomData;
13use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr};
14
15#[allow(unused_imports)]
16use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
17use jacquard_common::deps::smol_str::SmolStr;
18use jacquard_common::types::collection::{Collection, RecordError};
19use jacquard_common::types::string::{AtUri, Cid, Datetime};
20use jacquard_common::types::uri::{RecordUri, UriError};
21use jacquard_common::types::value::Data;
22use jacquard_common::xrpc::XrpcResp;
23use jacquard_derive::{IntoStatic, lexicon};
24use jacquard_lexicon::lexicon::LexiconDoc;
25use jacquard_lexicon::schema::LexiconSchema;
26
27#[allow(unused_imports)]
28use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
29use serde::{Serialize, Deserialize};
30use crate::net_anisota::settings;
31#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
34#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
35pub struct AnimationTiming<S: BosStr = DefaultStr> {
36 #[serde(skip_serializing_if = "Option::is_none")]
38 pub card_advance: Option<S>,
39 #[serde(skip_serializing_if = "Option::is_none")]
41 pub card_flip: Option<S>,
42 #[serde(skip_serializing_if = "Option::is_none")]
44 pub card_stack_entrance: Option<S>,
45 #[serde(skip_serializing_if = "Option::is_none")]
47 pub corner_elements: Option<S>,
48 #[serde(skip_serializing_if = "Option::is_none")]
50 pub fullscreen_transitions: Option<S>,
51 #[serde(skip_serializing_if = "Option::is_none")]
53 pub modals: Option<S>,
54 #[serde(skip_serializing_if = "Option::is_none")]
56 pub overall: Option<S>,
57 #[serde(skip_serializing_if = "Option::is_none")]
59 pub page_transitions: Option<S>,
60 #[serde(skip_serializing_if = "Option::is_none")]
62 pub thread_transitions: Option<S>,
63 #[serde(skip_serializing_if = "Option::is_none")]
65 pub ui_transitions: Option<S>,
66 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
67 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
68}
69
70
71#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
72#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
73pub struct BatchNotificationTypes<S: BosStr = DefaultStr> {
74 #[serde(skip_serializing_if = "Option::is_none")]
76 pub follows: Option<bool>,
77 #[serde(skip_serializing_if = "Option::is_none")]
79 pub likes: Option<bool>,
80 #[serde(skip_serializing_if = "Option::is_none")]
82 pub mentions: Option<bool>,
83 #[serde(skip_serializing_if = "Option::is_none")]
85 pub quotes: Option<bool>,
86 #[serde(skip_serializing_if = "Option::is_none")]
88 pub replies: Option<bool>,
89 #[serde(skip_serializing_if = "Option::is_none")]
91 pub reposts: Option<bool>,
92 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
93 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
94}
95
96#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
99#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
100pub struct BehaviorSettings<S: BosStr = DefaultStr> {
101 #[serde(skip_serializing_if = "Option::is_none")]
102 pub animation_timing: Option<settings::AnimationTiming<S>>,
103 #[serde(skip_serializing_if = "Option::is_none")]
105 pub anisota_only_mode: Option<bool>,
106 #[serde(skip_serializing_if = "Option::is_none")]
108 pub audio_enabled: Option<bool>,
109 #[serde(skip_serializing_if = "Option::is_none")]
110 pub batch_notification_types: Option<settings::BatchNotificationTypes<S>>,
111 #[serde(skip_serializing_if = "Option::is_none")]
113 pub batch_notifications: Option<bool>,
114 #[serde(skip_serializing_if = "Option::is_none")]
116 pub bypass_detached_quotes: Option<bool>,
117 #[serde(skip_serializing_if = "Option::is_none")]
119 pub combine_relationship_and_follower_filters: Option<bool>,
120 #[serde(skip_serializing_if = "Option::is_none")]
122 pub confirm_deletes: Option<bool>,
123 #[serde(skip_serializing_if = "Option::is_none")]
125 pub confirm_draft_saves: Option<bool>,
126 #[serde(skip_serializing_if = "Option::is_none")]
128 pub default_home_page: Option<S>,
129 #[serde(skip_serializing_if = "Option::is_none")]
131 pub default_post_target: Option<S>,
132 #[serde(skip_serializing_if = "Option::is_none")]
134 pub feed_cache_length: Option<i64>,
135 #[serde(skip_serializing_if = "Option::is_none")]
137 pub filter_by_follower_ratio: Option<bool>,
138 #[serde(skip_serializing_if = "Option::is_none")]
139 pub filter_notification_types: Option<settings::FilterNotificationTypes<S>>,
140 #[serde(skip_serializing_if = "Option::is_none")]
142 pub filter_notifications_by_followers: Option<bool>,
143 #[serde(skip_serializing_if = "Option::is_none")]
145 pub filter_notifications_by_relationship: Option<bool>,
146 #[serde(skip_serializing_if = "Option::is_none")]
147 pub filter_relationship_types: Option<settings::FilterRelationshipTypes<S>>,
148 #[serde(skip_serializing_if = "Option::is_none")]
150 pub force_chronological_sort: Option<bool>,
151 #[serde(skip_serializing_if = "Option::is_none")]
153 pub fullscreen_behavior: Option<S>,
154 #[serde(skip_serializing_if = "Option::is_none")]
156 pub hide_interacted_posts: Option<bool>,
157 #[serde(skip_serializing_if = "Option::is_none")]
159 pub hide_notification_count: Option<bool>,
160 #[serde(skip_serializing_if = "Option::is_none")]
162 pub hide_read_posts: Option<bool>,
163 #[serde(skip_serializing_if = "Option::is_none")]
164 pub hide_reposts: Option<settings::HideReposts<S>>,
165 #[serde(skip_serializing_if = "Option::is_none")]
167 pub highlight_by_follower_ratio: Option<bool>,
168 #[serde(skip_serializing_if = "Option::is_none")]
170 pub highlight_max_follower_count: Option<i64>,
171 #[serde(skip_serializing_if = "Option::is_none")]
173 pub highlight_min_follower_count: Option<S>,
174 #[serde(skip_serializing_if = "Option::is_none")]
176 pub highlight_min_follower_ratio: Option<S>,
177 #[serde(skip_serializing_if = "Option::is_none")]
178 pub highlight_notification_types: Option<settings::HighlightNotificationTypes<S>>,
179 #[serde(skip_serializing_if = "Option::is_none")]
181 pub highlight_notifications: Option<bool>,
182 #[serde(skip_serializing_if = "Option::is_none")]
184 pub include_reply_engagement: Option<bool>,
185 #[serde(skip_serializing_if = "Option::is_none")]
186 pub keyboard_shortcuts: Option<settings::KeyboardShortcuts<S>>,
187 #[serde(skip_serializing_if = "Option::is_none")]
189 pub max_follower_count: Option<i64>,
190 #[serde(skip_serializing_if = "Option::is_none")]
192 pub min_follower_count: Option<S>,
193 #[serde(skip_serializing_if = "Option::is_none")]
195 pub min_follower_ratio: Option<S>,
196 #[serde(skip_serializing_if = "Option::is_none")]
197 pub moderation_settings: Option<settings::ModerationSettings<S>>,
198 #[serde(skip_serializing_if = "Option::is_none")]
200 pub post_drafts: Option<bool>,
201 #[serde(skip_serializing_if = "Option::is_none")]
203 pub reverse_feed_order: Option<bool>,
204 #[serde(skip_serializing_if = "Option::is_none")]
206 pub show_blocked_posts: Option<bool>,
207 #[serde(skip_serializing_if = "Option::is_none")]
209 pub show_new_highlights_section: Option<bool>,
210 #[serde(skip_serializing_if = "Option::is_none")]
212 pub show_notification_sections: Option<bool>,
213 #[serde(skip_serializing_if = "Option::is_none")]
215 pub show_older_section: Option<bool>,
216 #[serde(skip_serializing_if = "Option::is_none")]
218 pub show_rarity_in_header: Option<bool>,
219 #[serde(skip_serializing_if = "Option::is_none")]
221 pub show_recently_read_section: Option<bool>,
222 #[serde(skip_serializing_if = "Option::is_none")]
224 pub show_thread_suggestion: Option<bool>,
225 #[serde(skip_serializing_if = "Option::is_none")]
227 pub show_unread_section: Option<bool>,
228 #[serde(skip_serializing_if = "Option::is_none")]
230 pub soundscape: Option<S>,
231 #[serde(skip_serializing_if = "Option::is_none")]
232 pub stats_visible_sections: Option<settings::StatsVisibleSections<S>>,
233 #[serde(skip_serializing_if = "Option::is_none")]
235 pub text_only_mode: Option<bool>,
236 #[serde(skip_serializing_if = "Option::is_none")]
238 pub track_read_posts: Option<bool>,
239 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
240 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
241}
242
243#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
246#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
247pub struct ControlSettings<S: BosStr = DefaultStr> {
248 #[serde(skip_serializing_if = "Option::is_none")]
250 pub account_list: Option<bool>,
251 #[serde(skip_serializing_if = "Option::is_none")]
253 pub back: Option<bool>,
254 #[serde(skip_serializing_if = "Option::is_none")]
256 pub comment_button: Option<bool>,
257 #[serde(skip_serializing_if = "Option::is_none")]
259 pub copy_author_did: Option<bool>,
260 #[serde(skip_serializing_if = "Option::is_none")]
262 pub copy_button: Option<bool>,
263 #[serde(skip_serializing_if = "Option::is_none")]
265 pub copy_post_link: Option<bool>,
266 #[serde(skip_serializing_if = "Option::is_none")]
268 pub copy_post_text: Option<bool>,
269 #[serde(skip_serializing_if = "Option::is_none")]
271 pub delete: Option<bool>,
272 #[serde(skip_serializing_if = "Option::is_none")]
274 pub engage_button: Option<bool>,
275 #[serde(skip_serializing_if = "Option::is_none")]
277 pub feed_switcher: Option<bool>,
278 #[serde(skip_serializing_if = "Option::is_none")]
280 pub fetch: Option<bool>,
281 #[serde(skip_serializing_if = "Option::is_none")]
283 pub flip: Option<bool>,
284 #[serde(skip_serializing_if = "Option::is_none")]
286 pub forward: Option<bool>,
287 #[serde(skip_serializing_if = "Option::is_none")]
289 pub fullscreen: Option<bool>,
290 #[serde(skip_serializing_if = "Option::is_none")]
292 pub leaflet_publications: Option<bool>,
293 #[serde(skip_serializing_if = "Option::is_none")]
295 pub like: Option<bool>,
296 #[serde(skip_serializing_if = "Option::is_none")]
298 pub list: Option<bool>,
299 #[serde(skip_serializing_if = "Option::is_none")]
301 pub multi_engage_button: Option<bool>,
302 #[serde(skip_serializing_if = "Option::is_none")]
304 pub multi_repost_button: Option<bool>,
305 #[serde(skip_serializing_if = "Option::is_none")]
307 pub position_button: Option<bool>,
308 #[serde(skip_serializing_if = "Option::is_none")]
310 pub post_list: Option<bool>,
311 #[serde(skip_serializing_if = "Option::is_none")]
313 pub quick_access: Option<bool>,
314 #[serde(skip_serializing_if = "Option::is_none")]
316 pub quote: Option<bool>,
317 #[serde(skip_serializing_if = "Option::is_none")]
319 pub relationship_button: Option<bool>,
320 #[serde(skip_serializing_if = "Option::is_none")]
322 pub reply: Option<bool>,
323 #[serde(skip_serializing_if = "Option::is_none")]
325 pub repost: Option<bool>,
326 #[serde(skip_serializing_if = "Option::is_none")]
328 pub shuffle: Option<bool>,
329 #[serde(skip_serializing_if = "Option::is_none")]
331 pub text_only_mode: Option<bool>,
332 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
333 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
334}
335
336#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
339#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
340pub struct CornerElements<S: BosStr = DefaultStr> {
341 #[serde(skip_serializing_if = "Option::is_none")]
343 pub bottom_left: Option<S>,
344 #[serde(skip_serializing_if = "Option::is_none")]
346 pub bottom_right: Option<S>,
347 #[serde(skip_serializing_if = "Option::is_none")]
349 pub top_left: Option<S>,
350 #[serde(skip_serializing_if = "Option::is_none")]
352 pub top_right: Option<S>,
353 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
354 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
355}
356
357
358#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
359#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
360pub struct FilterNotificationTypes<S: BosStr = DefaultStr> {
361 #[serde(skip_serializing_if = "Option::is_none")]
363 pub follows: Option<bool>,
364 #[serde(skip_serializing_if = "Option::is_none")]
366 pub likes: Option<bool>,
367 #[serde(skip_serializing_if = "Option::is_none")]
369 pub mentions: Option<bool>,
370 #[serde(skip_serializing_if = "Option::is_none")]
372 pub quotes: Option<bool>,
373 #[serde(skip_serializing_if = "Option::is_none")]
375 pub replies: Option<bool>,
376 #[serde(skip_serializing_if = "Option::is_none")]
378 pub reposts: Option<bool>,
379 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
380 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
381}
382
383
384#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
385#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
386pub struct FilterRelationshipTypes<S: BosStr = DefaultStr> {
387 #[serde(skip_serializing_if = "Option::is_none")]
389 pub followers: Option<bool>,
390 #[serde(skip_serializing_if = "Option::is_none")]
392 pub following: Option<bool>,
393 #[serde(skip_serializing_if = "Option::is_none")]
395 pub mutuals: Option<bool>,
396 #[serde(skip_serializing_if = "Option::is_none")]
398 pub non_mutuals: Option<bool>,
399 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
400 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
401}
402
403
404#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
405#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
406pub struct HideReposts<S: BosStr = DefaultStr> {
407 #[serde(skip_serializing_if = "Option::is_none")]
409 pub feed: Option<bool>,
410 #[serde(skip_serializing_if = "Option::is_none")]
412 pub profile: Option<bool>,
413 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
414 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
415}
416
417
418#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
419#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
420pub struct HighlightNotificationTypes<S: BosStr = DefaultStr> {
421 #[serde(skip_serializing_if = "Option::is_none")]
423 pub follows: Option<bool>,
424 #[serde(skip_serializing_if = "Option::is_none")]
426 pub likes: Option<bool>,
427 #[serde(skip_serializing_if = "Option::is_none")]
429 pub mentions: Option<bool>,
430 #[serde(skip_serializing_if = "Option::is_none")]
432 pub quotes: Option<bool>,
433 #[serde(skip_serializing_if = "Option::is_none")]
435 pub replies: Option<bool>,
436 #[serde(skip_serializing_if = "Option::is_none")]
438 pub reposts: Option<bool>,
439 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
440 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
441}
442
443#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
446#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
447pub struct KeyboardShortcuts<S: BosStr = DefaultStr> {
448 #[serde(skip_serializing_if = "Option::is_none")]
449 pub composer: Option<settings::KeyboardShortcutsComposer<S>>,
450 #[serde(skip_serializing_if = "Option::is_none")]
451 pub global: Option<settings::KeyboardShortcutsGlobal<S>>,
452 #[serde(skip_serializing_if = "Option::is_none")]
453 pub modals: Option<settings::KeyboardShortcutsModals<S>>,
454 #[serde(skip_serializing_if = "Option::is_none")]
455 pub navigation: Option<settings::KeyboardShortcutsNavigation<S>>,
456 #[serde(skip_serializing_if = "Option::is_none")]
457 pub post_interactions: Option<settings::KeyboardShortcutsPostInteractions<S>>,
458 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
459 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
460}
461
462#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
465#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
466pub struct KeyboardShortcutsComposer<S: BosStr = DefaultStr> {
467 #[serde(skip_serializing_if = "Option::is_none")]
469 pub publish: Option<S>,
470 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
471 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
472}
473
474#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
477#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
478pub struct KeyboardShortcutsGlobal<S: BosStr = DefaultStr> {
479 #[serde(skip_serializing_if = "Option::is_none")]
481 pub collection: Option<S>,
482 #[serde(skip_serializing_if = "Option::is_none")]
484 pub feed: Option<S>,
485 #[serde(skip_serializing_if = "Option::is_none")]
487 pub inventory: Option<S>,
488 #[serde(skip_serializing_if = "Option::is_none")]
490 pub profile: Option<S>,
491 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
492 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
493}
494
495#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
498#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
499pub struct KeyboardShortcutsModals<S: BosStr = DefaultStr> {
500 #[serde(skip_serializing_if = "Option::is_none")]
502 pub keyboard_help: Option<S>,
503 #[serde(skip_serializing_if = "Option::is_none")]
505 pub notifications: Option<S>,
506 #[serde(skip_serializing_if = "Option::is_none")]
508 pub post_composer: Option<S>,
509 #[serde(skip_serializing_if = "Option::is_none")]
511 pub stats: Option<S>,
512 #[serde(skip_serializing_if = "Option::is_none")]
514 pub touch_menu: Option<S>,
515 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
516 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
517}
518
519#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
522#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
523pub struct KeyboardShortcutsNavigation<S: BosStr = DefaultStr> {
524 #[serde(skip_serializing_if = "Option::is_none")]
526 pub arrow_down: Option<S>,
527 #[serde(skip_serializing_if = "Option::is_none")]
529 pub arrow_left: Option<S>,
530 #[serde(skip_serializing_if = "Option::is_none")]
532 pub arrow_right: Option<S>,
533 #[serde(skip_serializing_if = "Option::is_none")]
535 pub arrow_up: Option<S>,
536 #[serde(skip_serializing_if = "Option::is_none")]
538 pub escape: Option<S>,
539 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
540 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
541}
542
543#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
546#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
547pub struct KeyboardShortcutsPostInteractions<S: BosStr = DefaultStr> {
548 #[serde(skip_serializing_if = "Option::is_none")]
550 pub like: Option<S>,
551 #[serde(skip_serializing_if = "Option::is_none")]
553 pub quote: Option<S>,
554 #[serde(skip_serializing_if = "Option::is_none")]
556 pub reply: Option<S>,
557 #[serde(skip_serializing_if = "Option::is_none")]
559 pub repost: Option<S>,
560 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
561 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
562}
563
564#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
567#[serde(
568 rename_all = "camelCase",
569 rename = "net.anisota.settings",
570 tag = "$type",
571 bound(deserialize = "S: Deserialize<'de> + BosStr")
572)]
573pub struct Settings<S: BosStr = DefaultStr> {
574 #[serde(skip_serializing_if = "Option::is_none")]
575 pub behavior_settings: Option<settings::BehaviorSettings<S>>,
576 #[serde(skip_serializing_if = "Option::is_none")]
578 pub control_order: Option<Vec<S>>,
579 #[serde(skip_serializing_if = "Option::is_none")]
580 pub control_settings: Option<settings::ControlSettings<S>>,
581 pub created_at: Datetime,
583 #[serde(skip_serializing_if = "Option::is_none")]
585 pub theme: Option<S>,
586 #[serde(skip_serializing_if = "Option::is_none")]
587 pub ui_settings: Option<settings::UiSettings<S>>,
588 pub updated_at: Datetime,
590 pub version: i64,
592 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
593 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
594}
595
596#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
599#[serde(rename_all = "camelCase")]
600pub struct SettingsGetRecordOutput<S: BosStr = DefaultStr> {
601 #[serde(skip_serializing_if = "Option::is_none")]
602 pub cid: Option<Cid<S>>,
603 pub uri: AtUri<S>,
604 pub value: Settings<S>,
605}
606
607#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
610#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
611pub struct ModerationSettings<S: BosStr = DefaultStr> {
612 #[serde(skip_serializing_if = "Option::is_none")]
614 pub muted_accounts_handling: Option<S>,
615 #[serde(skip_serializing_if = "Option::is_none")]
617 pub muted_content_handling: Option<S>,
618 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
619 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
620}
621
622
623#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
624#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
625pub struct StatsVisibleSections<S: BosStr = DefaultStr> {
626 #[serde(skip_serializing_if = "Option::is_none")]
628 pub activity: Option<bool>,
629 #[serde(skip_serializing_if = "Option::is_none")]
631 pub engagement: Option<bool>,
632 #[serde(skip_serializing_if = "Option::is_none")]
634 pub progress: Option<bool>,
635 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
636 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
637}
638
639#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
642#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
643pub struct UiSettings<S: BosStr = DefaultStr> {
644 #[serde(skip_serializing_if = "Option::is_none")]
645 pub corner_elements: Option<settings::CornerElements<S>>,
646 #[serde(skip_serializing_if = "Option::is_none")]
648 pub font_size: Option<S>,
649 #[serde(skip_serializing_if = "Option::is_none")]
651 pub post_card_primary_slot: Option<S>,
652 #[serde(skip_serializing_if = "Option::is_none")]
654 pub post_card_secondary_slot: Option<S>,
655 #[serde(skip_serializing_if = "Option::is_none")]
657 pub profile_card_primary_slot: Option<S>,
658 #[serde(skip_serializing_if = "Option::is_none")]
660 pub profile_card_secondary_slot: Option<S>,
661 #[serde(skip_serializing_if = "Option::is_none")]
663 pub show_post_card_at_symbol: Option<bool>,
664 #[serde(skip_serializing_if = "Option::is_none")]
666 pub show_post_card_avatar: Option<bool>,
667 #[serde(skip_serializing_if = "Option::is_none")]
669 pub show_post_card_display_name: Option<bool>,
670 #[serde(skip_serializing_if = "Option::is_none")]
672 pub show_post_card_footer: Option<bool>,
673 #[serde(skip_serializing_if = "Option::is_none")]
675 pub show_post_card_handle: Option<bool>,
676 #[serde(skip_serializing_if = "Option::is_none")]
678 pub show_post_card_header: Option<bool>,
679 #[serde(skip_serializing_if = "Option::is_none")]
681 pub show_post_count: Option<bool>,
682 #[serde(skip_serializing_if = "Option::is_none")]
684 pub show_post_read_indicator: Option<bool>,
685 #[serde(skip_serializing_if = "Option::is_none")]
687 pub show_profile_at_symbol: Option<bool>,
688 #[serde(skip_serializing_if = "Option::is_none")]
690 pub show_profile_blocked: Option<bool>,
691 #[serde(skip_serializing_if = "Option::is_none")]
693 pub show_profile_blocking: Option<bool>,
694 #[serde(skip_serializing_if = "Option::is_none")]
696 pub show_profile_cancelled: Option<bool>,
697 #[serde(skip_serializing_if = "Option::is_none")]
699 pub show_profile_cancelling: Option<bool>,
700 #[serde(skip_serializing_if = "Option::is_none")]
702 pub show_profile_card_avatar: Option<bool>,
703 #[serde(skip_serializing_if = "Option::is_none")]
705 pub show_profile_card_footer: Option<bool>,
706 #[serde(skip_serializing_if = "Option::is_none")]
708 pub show_profile_card_header: Option<bool>,
709 #[serde(skip_serializing_if = "Option::is_none")]
711 pub show_profile_collections: Option<bool>,
712 #[serde(skip_serializing_if = "Option::is_none")]
714 pub show_profile_display_name: Option<bool>,
715 #[serde(skip_serializing_if = "Option::is_none")]
717 pub show_profile_followers: Option<bool>,
718 #[serde(skip_serializing_if = "Option::is_none")]
720 pub show_profile_following: Option<bool>,
721 #[serde(skip_serializing_if = "Option::is_none")]
723 pub show_profile_handle: Option<bool>,
724 #[serde(skip_serializing_if = "Option::is_none")]
726 pub show_profile_lexicons: Option<bool>,
727 #[serde(skip_serializing_if = "Option::is_none")]
729 pub show_profile_listed: Option<bool>,
730 #[serde(skip_serializing_if = "Option::is_none")]
732 pub show_profile_listing: Option<bool>,
733 #[serde(skip_serializing_if = "Option::is_none")]
735 pub show_profile_lists: Option<bool>,
736 #[serde(skip_serializing_if = "Option::is_none")]
738 pub show_profile_posts: Option<bool>,
739 #[serde(skip_serializing_if = "Option::is_none")]
741 pub show_profile_pronouns: Option<bool>,
742 #[serde(skip_serializing_if = "Option::is_none")]
744 pub show_profile_verified: Option<bool>,
745 #[serde(skip_serializing_if = "Option::is_none")]
747 pub show_profile_verifying: Option<bool>,
748 #[serde(skip_serializing_if = "Option::is_none")]
750 pub show_profile_website: Option<bool>,
751 #[serde(skip_serializing_if = "Option::is_none")]
753 pub show_rarity_indicator: Option<bool>,
754 #[serde(skip_serializing_if = "Option::is_none")]
756 pub show_timestamp: Option<bool>,
757 #[serde(skip_serializing_if = "Option::is_none")]
759 pub show_username: Option<bool>,
760 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
761 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
762}
763
764impl<S: BosStr> Settings<S> {
765 pub fn uri(uri: S) -> Result<RecordUri<S, SettingsRecord>, UriError> {
766 RecordUri::try_from_uri(AtUri::new(uri)?)
767 }
768}
769
770impl<S: BosStr> LexiconSchema for AnimationTiming<S> {
771 fn nsid() -> &'static str {
772 "net.anisota.settings"
773 }
774 fn def_name() -> &'static str {
775 "animationTiming"
776 }
777 fn lexicon_doc() -> LexiconDoc<'static> {
778 lexicon_doc_net_anisota_settings()
779 }
780 fn validate(&self) -> Result<(), ConstraintError> {
781 if let Some(ref value) = self.card_advance {
782 #[allow(unused_comparisons)]
783 if <str>::len(value.as_ref()) > 10usize {
784 return Err(ConstraintError::MaxLength {
785 path: ValidationPath::from_field("card_advance"),
786 max: 10usize,
787 actual: <str>::len(value.as_ref()),
788 });
789 }
790 }
791 if let Some(ref value) = self.card_flip {
792 #[allow(unused_comparisons)]
793 if <str>::len(value.as_ref()) > 10usize {
794 return Err(ConstraintError::MaxLength {
795 path: ValidationPath::from_field("card_flip"),
796 max: 10usize,
797 actual: <str>::len(value.as_ref()),
798 });
799 }
800 }
801 if let Some(ref value) = self.card_stack_entrance {
802 #[allow(unused_comparisons)]
803 if <str>::len(value.as_ref()) > 10usize {
804 return Err(ConstraintError::MaxLength {
805 path: ValidationPath::from_field("card_stack_entrance"),
806 max: 10usize,
807 actual: <str>::len(value.as_ref()),
808 });
809 }
810 }
811 if let Some(ref value) = self.corner_elements {
812 #[allow(unused_comparisons)]
813 if <str>::len(value.as_ref()) > 10usize {
814 return Err(ConstraintError::MaxLength {
815 path: ValidationPath::from_field("corner_elements"),
816 max: 10usize,
817 actual: <str>::len(value.as_ref()),
818 });
819 }
820 }
821 if let Some(ref value) = self.fullscreen_transitions {
822 #[allow(unused_comparisons)]
823 if <str>::len(value.as_ref()) > 10usize {
824 return Err(ConstraintError::MaxLength {
825 path: ValidationPath::from_field("fullscreen_transitions"),
826 max: 10usize,
827 actual: <str>::len(value.as_ref()),
828 });
829 }
830 }
831 if let Some(ref value) = self.modals {
832 #[allow(unused_comparisons)]
833 if <str>::len(value.as_ref()) > 10usize {
834 return Err(ConstraintError::MaxLength {
835 path: ValidationPath::from_field("modals"),
836 max: 10usize,
837 actual: <str>::len(value.as_ref()),
838 });
839 }
840 }
841 if let Some(ref value) = self.overall {
842 #[allow(unused_comparisons)]
843 if <str>::len(value.as_ref()) > 10usize {
844 return Err(ConstraintError::MaxLength {
845 path: ValidationPath::from_field("overall"),
846 max: 10usize,
847 actual: <str>::len(value.as_ref()),
848 });
849 }
850 }
851 if let Some(ref value) = self.page_transitions {
852 #[allow(unused_comparisons)]
853 if <str>::len(value.as_ref()) > 10usize {
854 return Err(ConstraintError::MaxLength {
855 path: ValidationPath::from_field("page_transitions"),
856 max: 10usize,
857 actual: <str>::len(value.as_ref()),
858 });
859 }
860 }
861 if let Some(ref value) = self.thread_transitions {
862 #[allow(unused_comparisons)]
863 if <str>::len(value.as_ref()) > 10usize {
864 return Err(ConstraintError::MaxLength {
865 path: ValidationPath::from_field("thread_transitions"),
866 max: 10usize,
867 actual: <str>::len(value.as_ref()),
868 });
869 }
870 }
871 if let Some(ref value) = self.ui_transitions {
872 #[allow(unused_comparisons)]
873 if <str>::len(value.as_ref()) > 10usize {
874 return Err(ConstraintError::MaxLength {
875 path: ValidationPath::from_field("ui_transitions"),
876 max: 10usize,
877 actual: <str>::len(value.as_ref()),
878 });
879 }
880 }
881 Ok(())
882 }
883}
884
885impl<S: BosStr> LexiconSchema for BatchNotificationTypes<S> {
886 fn nsid() -> &'static str {
887 "net.anisota.settings"
888 }
889 fn def_name() -> &'static str {
890 "batchNotificationTypes"
891 }
892 fn lexicon_doc() -> LexiconDoc<'static> {
893 lexicon_doc_net_anisota_settings()
894 }
895 fn validate(&self) -> Result<(), ConstraintError> {
896 Ok(())
897 }
898}
899
900impl<S: BosStr> LexiconSchema for BehaviorSettings<S> {
901 fn nsid() -> &'static str {
902 "net.anisota.settings"
903 }
904 fn def_name() -> &'static str {
905 "behaviorSettings"
906 }
907 fn lexicon_doc() -> LexiconDoc<'static> {
908 lexicon_doc_net_anisota_settings()
909 }
910 fn validate(&self) -> Result<(), ConstraintError> {
911 if let Some(ref value) = self.feed_cache_length {
912 if *value < 1i64 {
913 return Err(ConstraintError::Minimum {
914 path: ValidationPath::from_field("feed_cache_length"),
915 min: 1i64,
916 actual: *value,
917 });
918 }
919 }
920 if let Some(ref value) = self.highlight_min_follower_count {
921 #[allow(unused_comparisons)]
922 if <str>::len(value.as_ref()) > 20usize {
923 return Err(ConstraintError::MaxLength {
924 path: ValidationPath::from_field("highlight_min_follower_count"),
925 max: 20usize,
926 actual: <str>::len(value.as_ref()),
927 });
928 }
929 }
930 if let Some(ref value) = self.highlight_min_follower_ratio {
931 #[allow(unused_comparisons)]
932 if <str>::len(value.as_ref()) > 20usize {
933 return Err(ConstraintError::MaxLength {
934 path: ValidationPath::from_field("highlight_min_follower_ratio"),
935 max: 20usize,
936 actual: <str>::len(value.as_ref()),
937 });
938 }
939 }
940 if let Some(ref value) = self.min_follower_count {
941 #[allow(unused_comparisons)]
942 if <str>::len(value.as_ref()) > 20usize {
943 return Err(ConstraintError::MaxLength {
944 path: ValidationPath::from_field("min_follower_count"),
945 max: 20usize,
946 actual: <str>::len(value.as_ref()),
947 });
948 }
949 }
950 if let Some(ref value) = self.min_follower_ratio {
951 #[allow(unused_comparisons)]
952 if <str>::len(value.as_ref()) > 20usize {
953 return Err(ConstraintError::MaxLength {
954 path: ValidationPath::from_field("min_follower_ratio"),
955 max: 20usize,
956 actual: <str>::len(value.as_ref()),
957 });
958 }
959 }
960 Ok(())
961 }
962}
963
964impl<S: BosStr> LexiconSchema for ControlSettings<S> {
965 fn nsid() -> &'static str {
966 "net.anisota.settings"
967 }
968 fn def_name() -> &'static str {
969 "controlSettings"
970 }
971 fn lexicon_doc() -> LexiconDoc<'static> {
972 lexicon_doc_net_anisota_settings()
973 }
974 fn validate(&self) -> Result<(), ConstraintError> {
975 Ok(())
976 }
977}
978
979impl<S: BosStr> LexiconSchema for CornerElements<S> {
980 fn nsid() -> &'static str {
981 "net.anisota.settings"
982 }
983 fn def_name() -> &'static str {
984 "cornerElements"
985 }
986 fn lexicon_doc() -> LexiconDoc<'static> {
987 lexicon_doc_net_anisota_settings()
988 }
989 fn validate(&self) -> Result<(), ConstraintError> {
990 Ok(())
991 }
992}
993
994impl<S: BosStr> LexiconSchema for FilterNotificationTypes<S> {
995 fn nsid() -> &'static str {
996 "net.anisota.settings"
997 }
998 fn def_name() -> &'static str {
999 "filterNotificationTypes"
1000 }
1001 fn lexicon_doc() -> LexiconDoc<'static> {
1002 lexicon_doc_net_anisota_settings()
1003 }
1004 fn validate(&self) -> Result<(), ConstraintError> {
1005 Ok(())
1006 }
1007}
1008
1009impl<S: BosStr> LexiconSchema for FilterRelationshipTypes<S> {
1010 fn nsid() -> &'static str {
1011 "net.anisota.settings"
1012 }
1013 fn def_name() -> &'static str {
1014 "filterRelationshipTypes"
1015 }
1016 fn lexicon_doc() -> LexiconDoc<'static> {
1017 lexicon_doc_net_anisota_settings()
1018 }
1019 fn validate(&self) -> Result<(), ConstraintError> {
1020 Ok(())
1021 }
1022}
1023
1024impl<S: BosStr> LexiconSchema for HideReposts<S> {
1025 fn nsid() -> &'static str {
1026 "net.anisota.settings"
1027 }
1028 fn def_name() -> &'static str {
1029 "hideReposts"
1030 }
1031 fn lexicon_doc() -> LexiconDoc<'static> {
1032 lexicon_doc_net_anisota_settings()
1033 }
1034 fn validate(&self) -> Result<(), ConstraintError> {
1035 Ok(())
1036 }
1037}
1038
1039impl<S: BosStr> LexiconSchema for HighlightNotificationTypes<S> {
1040 fn nsid() -> &'static str {
1041 "net.anisota.settings"
1042 }
1043 fn def_name() -> &'static str {
1044 "highlightNotificationTypes"
1045 }
1046 fn lexicon_doc() -> LexiconDoc<'static> {
1047 lexicon_doc_net_anisota_settings()
1048 }
1049 fn validate(&self) -> Result<(), ConstraintError> {
1050 Ok(())
1051 }
1052}
1053
1054impl<S: BosStr> LexiconSchema for KeyboardShortcuts<S> {
1055 fn nsid() -> &'static str {
1056 "net.anisota.settings"
1057 }
1058 fn def_name() -> &'static str {
1059 "keyboardShortcuts"
1060 }
1061 fn lexicon_doc() -> LexiconDoc<'static> {
1062 lexicon_doc_net_anisota_settings()
1063 }
1064 fn validate(&self) -> Result<(), ConstraintError> {
1065 Ok(())
1066 }
1067}
1068
1069impl<S: BosStr> LexiconSchema for KeyboardShortcutsComposer<S> {
1070 fn nsid() -> &'static str {
1071 "net.anisota.settings"
1072 }
1073 fn def_name() -> &'static str {
1074 "keyboardShortcutsComposer"
1075 }
1076 fn lexicon_doc() -> LexiconDoc<'static> {
1077 lexicon_doc_net_anisota_settings()
1078 }
1079 fn validate(&self) -> Result<(), ConstraintError> {
1080 if let Some(ref value) = self.publish {
1081 #[allow(unused_comparisons)]
1082 if <str>::len(value.as_ref()) > 50usize {
1083 return Err(ConstraintError::MaxLength {
1084 path: ValidationPath::from_field("publish"),
1085 max: 50usize,
1086 actual: <str>::len(value.as_ref()),
1087 });
1088 }
1089 }
1090 Ok(())
1091 }
1092}
1093
1094impl<S: BosStr> LexiconSchema for KeyboardShortcutsGlobal<S> {
1095 fn nsid() -> &'static str {
1096 "net.anisota.settings"
1097 }
1098 fn def_name() -> &'static str {
1099 "keyboardShortcutsGlobal"
1100 }
1101 fn lexicon_doc() -> LexiconDoc<'static> {
1102 lexicon_doc_net_anisota_settings()
1103 }
1104 fn validate(&self) -> Result<(), ConstraintError> {
1105 if let Some(ref value) = self.collection {
1106 #[allow(unused_comparisons)]
1107 if <str>::len(value.as_ref()) > 50usize {
1108 return Err(ConstraintError::MaxLength {
1109 path: ValidationPath::from_field("collection"),
1110 max: 50usize,
1111 actual: <str>::len(value.as_ref()),
1112 });
1113 }
1114 }
1115 if let Some(ref value) = self.feed {
1116 #[allow(unused_comparisons)]
1117 if <str>::len(value.as_ref()) > 50usize {
1118 return Err(ConstraintError::MaxLength {
1119 path: ValidationPath::from_field("feed"),
1120 max: 50usize,
1121 actual: <str>::len(value.as_ref()),
1122 });
1123 }
1124 }
1125 if let Some(ref value) = self.inventory {
1126 #[allow(unused_comparisons)]
1127 if <str>::len(value.as_ref()) > 50usize {
1128 return Err(ConstraintError::MaxLength {
1129 path: ValidationPath::from_field("inventory"),
1130 max: 50usize,
1131 actual: <str>::len(value.as_ref()),
1132 });
1133 }
1134 }
1135 if let Some(ref value) = self.profile {
1136 #[allow(unused_comparisons)]
1137 if <str>::len(value.as_ref()) > 50usize {
1138 return Err(ConstraintError::MaxLength {
1139 path: ValidationPath::from_field("profile"),
1140 max: 50usize,
1141 actual: <str>::len(value.as_ref()),
1142 });
1143 }
1144 }
1145 Ok(())
1146 }
1147}
1148
1149impl<S: BosStr> LexiconSchema for KeyboardShortcutsModals<S> {
1150 fn nsid() -> &'static str {
1151 "net.anisota.settings"
1152 }
1153 fn def_name() -> &'static str {
1154 "keyboardShortcutsModals"
1155 }
1156 fn lexicon_doc() -> LexiconDoc<'static> {
1157 lexicon_doc_net_anisota_settings()
1158 }
1159 fn validate(&self) -> Result<(), ConstraintError> {
1160 if let Some(ref value) = self.keyboard_help {
1161 #[allow(unused_comparisons)]
1162 if <str>::len(value.as_ref()) > 50usize {
1163 return Err(ConstraintError::MaxLength {
1164 path: ValidationPath::from_field("keyboard_help"),
1165 max: 50usize,
1166 actual: <str>::len(value.as_ref()),
1167 });
1168 }
1169 }
1170 if let Some(ref value) = self.notifications {
1171 #[allow(unused_comparisons)]
1172 if <str>::len(value.as_ref()) > 50usize {
1173 return Err(ConstraintError::MaxLength {
1174 path: ValidationPath::from_field("notifications"),
1175 max: 50usize,
1176 actual: <str>::len(value.as_ref()),
1177 });
1178 }
1179 }
1180 if let Some(ref value) = self.post_composer {
1181 #[allow(unused_comparisons)]
1182 if <str>::len(value.as_ref()) > 50usize {
1183 return Err(ConstraintError::MaxLength {
1184 path: ValidationPath::from_field("post_composer"),
1185 max: 50usize,
1186 actual: <str>::len(value.as_ref()),
1187 });
1188 }
1189 }
1190 if let Some(ref value) = self.stats {
1191 #[allow(unused_comparisons)]
1192 if <str>::len(value.as_ref()) > 50usize {
1193 return Err(ConstraintError::MaxLength {
1194 path: ValidationPath::from_field("stats"),
1195 max: 50usize,
1196 actual: <str>::len(value.as_ref()),
1197 });
1198 }
1199 }
1200 if let Some(ref value) = self.touch_menu {
1201 #[allow(unused_comparisons)]
1202 if <str>::len(value.as_ref()) > 50usize {
1203 return Err(ConstraintError::MaxLength {
1204 path: ValidationPath::from_field("touch_menu"),
1205 max: 50usize,
1206 actual: <str>::len(value.as_ref()),
1207 });
1208 }
1209 }
1210 Ok(())
1211 }
1212}
1213
1214impl<S: BosStr> LexiconSchema for KeyboardShortcutsNavigation<S> {
1215 fn nsid() -> &'static str {
1216 "net.anisota.settings"
1217 }
1218 fn def_name() -> &'static str {
1219 "keyboardShortcutsNavigation"
1220 }
1221 fn lexicon_doc() -> LexiconDoc<'static> {
1222 lexicon_doc_net_anisota_settings()
1223 }
1224 fn validate(&self) -> Result<(), ConstraintError> {
1225 if let Some(ref value) = self.arrow_down {
1226 #[allow(unused_comparisons)]
1227 if <str>::len(value.as_ref()) > 50usize {
1228 return Err(ConstraintError::MaxLength {
1229 path: ValidationPath::from_field("arrow_down"),
1230 max: 50usize,
1231 actual: <str>::len(value.as_ref()),
1232 });
1233 }
1234 }
1235 if let Some(ref value) = self.arrow_left {
1236 #[allow(unused_comparisons)]
1237 if <str>::len(value.as_ref()) > 50usize {
1238 return Err(ConstraintError::MaxLength {
1239 path: ValidationPath::from_field("arrow_left"),
1240 max: 50usize,
1241 actual: <str>::len(value.as_ref()),
1242 });
1243 }
1244 }
1245 if let Some(ref value) = self.arrow_right {
1246 #[allow(unused_comparisons)]
1247 if <str>::len(value.as_ref()) > 50usize {
1248 return Err(ConstraintError::MaxLength {
1249 path: ValidationPath::from_field("arrow_right"),
1250 max: 50usize,
1251 actual: <str>::len(value.as_ref()),
1252 });
1253 }
1254 }
1255 if let Some(ref value) = self.arrow_up {
1256 #[allow(unused_comparisons)]
1257 if <str>::len(value.as_ref()) > 50usize {
1258 return Err(ConstraintError::MaxLength {
1259 path: ValidationPath::from_field("arrow_up"),
1260 max: 50usize,
1261 actual: <str>::len(value.as_ref()),
1262 });
1263 }
1264 }
1265 if let Some(ref value) = self.escape {
1266 #[allow(unused_comparisons)]
1267 if <str>::len(value.as_ref()) > 50usize {
1268 return Err(ConstraintError::MaxLength {
1269 path: ValidationPath::from_field("escape"),
1270 max: 50usize,
1271 actual: <str>::len(value.as_ref()),
1272 });
1273 }
1274 }
1275 Ok(())
1276 }
1277}
1278
1279impl<S: BosStr> LexiconSchema for KeyboardShortcutsPostInteractions<S> {
1280 fn nsid() -> &'static str {
1281 "net.anisota.settings"
1282 }
1283 fn def_name() -> &'static str {
1284 "keyboardShortcutsPostInteractions"
1285 }
1286 fn lexicon_doc() -> LexiconDoc<'static> {
1287 lexicon_doc_net_anisota_settings()
1288 }
1289 fn validate(&self) -> Result<(), ConstraintError> {
1290 if let Some(ref value) = self.like {
1291 #[allow(unused_comparisons)]
1292 if <str>::len(value.as_ref()) > 50usize {
1293 return Err(ConstraintError::MaxLength {
1294 path: ValidationPath::from_field("like"),
1295 max: 50usize,
1296 actual: <str>::len(value.as_ref()),
1297 });
1298 }
1299 }
1300 if let Some(ref value) = self.quote {
1301 #[allow(unused_comparisons)]
1302 if <str>::len(value.as_ref()) > 50usize {
1303 return Err(ConstraintError::MaxLength {
1304 path: ValidationPath::from_field("quote"),
1305 max: 50usize,
1306 actual: <str>::len(value.as_ref()),
1307 });
1308 }
1309 }
1310 if let Some(ref value) = self.reply {
1311 #[allow(unused_comparisons)]
1312 if <str>::len(value.as_ref()) > 50usize {
1313 return Err(ConstraintError::MaxLength {
1314 path: ValidationPath::from_field("reply"),
1315 max: 50usize,
1316 actual: <str>::len(value.as_ref()),
1317 });
1318 }
1319 }
1320 if let Some(ref value) = self.repost {
1321 #[allow(unused_comparisons)]
1322 if <str>::len(value.as_ref()) > 50usize {
1323 return Err(ConstraintError::MaxLength {
1324 path: ValidationPath::from_field("repost"),
1325 max: 50usize,
1326 actual: <str>::len(value.as_ref()),
1327 });
1328 }
1329 }
1330 Ok(())
1331 }
1332}
1333
1334#[derive(Debug, Serialize, Deserialize)]
1337pub struct SettingsRecord;
1338impl XrpcResp for SettingsRecord {
1339 const NSID: &'static str = "net.anisota.settings";
1340 const ENCODING: &'static str = "application/json";
1341 type Output<S: BosStr> = SettingsGetRecordOutput<S>;
1342 type Err = RecordError;
1343}
1344
1345impl<S: BosStr> From<SettingsGetRecordOutput<S>> for Settings<S> {
1346 fn from(output: SettingsGetRecordOutput<S>) -> Self {
1347 output.value
1348 }
1349}
1350
1351impl<S: BosStr> Collection for Settings<S> {
1352 const NSID: &'static str = "net.anisota.settings";
1353 type Record = SettingsRecord;
1354}
1355
1356impl Collection for SettingsRecord {
1357 const NSID: &'static str = "net.anisota.settings";
1358 type Record = SettingsRecord;
1359}
1360
1361impl<S: BosStr> LexiconSchema for Settings<S> {
1362 fn nsid() -> &'static str {
1363 "net.anisota.settings"
1364 }
1365 fn def_name() -> &'static str {
1366 "main"
1367 }
1368 fn lexicon_doc() -> LexiconDoc<'static> {
1369 lexicon_doc_net_anisota_settings()
1370 }
1371 fn validate(&self) -> Result<(), ConstraintError> {
1372 {
1373 let value = &self.version;
1374 if *value < 1i64 {
1375 return Err(ConstraintError::Minimum {
1376 path: ValidationPath::from_field("version"),
1377 min: 1i64,
1378 actual: *value,
1379 });
1380 }
1381 }
1382 Ok(())
1383 }
1384}
1385
1386impl<S: BosStr> LexiconSchema for ModerationSettings<S> {
1387 fn nsid() -> &'static str {
1388 "net.anisota.settings"
1389 }
1390 fn def_name() -> &'static str {
1391 "moderationSettings"
1392 }
1393 fn lexicon_doc() -> LexiconDoc<'static> {
1394 lexicon_doc_net_anisota_settings()
1395 }
1396 fn validate(&self) -> Result<(), ConstraintError> {
1397 Ok(())
1398 }
1399}
1400
1401impl<S: BosStr> LexiconSchema for StatsVisibleSections<S> {
1402 fn nsid() -> &'static str {
1403 "net.anisota.settings"
1404 }
1405 fn def_name() -> &'static str {
1406 "statsVisibleSections"
1407 }
1408 fn lexicon_doc() -> LexiconDoc<'static> {
1409 lexicon_doc_net_anisota_settings()
1410 }
1411 fn validate(&self) -> Result<(), ConstraintError> {
1412 Ok(())
1413 }
1414}
1415
1416impl<S: BosStr> LexiconSchema for UiSettings<S> {
1417 fn nsid() -> &'static str {
1418 "net.anisota.settings"
1419 }
1420 fn def_name() -> &'static str {
1421 "uiSettings"
1422 }
1423 fn lexicon_doc() -> LexiconDoc<'static> {
1424 lexicon_doc_net_anisota_settings()
1425 }
1426 fn validate(&self) -> Result<(), ConstraintError> {
1427 if let Some(ref value) = self.font_size {
1428 #[allow(unused_comparisons)]
1429 if <str>::len(value.as_ref()) > 10usize {
1430 return Err(ConstraintError::MaxLength {
1431 path: ValidationPath::from_field("font_size"),
1432 max: 10usize,
1433 actual: <str>::len(value.as_ref()),
1434 });
1435 }
1436 }
1437 Ok(())
1438 }
1439}
1440
1441fn lexicon_doc_net_anisota_settings() -> LexiconDoc<'static> {
1442 #[allow(unused_imports)]
1443 use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
1444 use jacquard_lexicon::lexicon::*;
1445 use alloc::collections::BTreeMap;
1446 LexiconDoc {
1447 lexicon: Lexicon::Lexicon1,
1448 id: CowStr::new_static("net.anisota.settings"),
1449 defs: {
1450 let mut map = BTreeMap::new();
1451 map.insert(
1452 SmolStr::new_static("animationTiming"),
1453 LexUserType::Object(LexObject {
1454 description: Some(
1455 CowStr::new_static(
1456 "Animation timing and speed settings for various UI animations",
1457 ),
1458 ),
1459 properties: {
1460 #[allow(unused_mut)]
1461 let mut map = BTreeMap::new();
1462 map.insert(
1463 SmolStr::new_static("cardAdvance"),
1464 LexObjectProperty::String(LexString {
1465 description: Some(
1466 CowStr::new_static(
1467 "Card advance exit to right and entrance back in from right (stored as string)",
1468 ),
1469 ),
1470 max_length: Some(10usize),
1471 ..Default::default()
1472 }),
1473 );
1474 map.insert(
1475 SmolStr::new_static("cardFlip"),
1476 LexObjectProperty::String(LexString {
1477 description: Some(
1478 CowStr::new_static(
1479 "Card flip animation between front and back (stored as string)",
1480 ),
1481 ),
1482 max_length: Some(10usize),
1483 ..Default::default()
1484 }),
1485 );
1486 map.insert(
1487 SmolStr::new_static("cardStackEntrance"),
1488 LexObjectProperty::String(LexString {
1489 description: Some(
1490 CowStr::new_static(
1491 "Card stack animate in entrance from the top of screen (stored as string)",
1492 ),
1493 ),
1494 max_length: Some(10usize),
1495 ..Default::default()
1496 }),
1497 );
1498 map.insert(
1499 SmolStr::new_static("cornerElements"),
1500 LexObjectProperty::String(LexString {
1501 description: Some(
1502 CowStr::new_static(
1503 "Staggered interactive corner element entrance animation (stored as string)",
1504 ),
1505 ),
1506 max_length: Some(10usize),
1507 ..Default::default()
1508 }),
1509 );
1510 map.insert(
1511 SmolStr::new_static("fullscreenTransitions"),
1512 LexObjectProperty::String(LexString {
1513 description: Some(
1514 CowStr::new_static(
1515 "Card stack height expansion and shrinking when entering/exiting fullscreen (stored as string)",
1516 ),
1517 ),
1518 max_length: Some(10usize),
1519 ..Default::default()
1520 }),
1521 );
1522 map.insert(
1523 SmolStr::new_static("modals"),
1524 LexObjectProperty::String(LexString {
1525 description: Some(
1526 CowStr::new_static(
1527 "Modal entrance and exit animations (stored as string)",
1528 ),
1529 ),
1530 max_length: Some(10usize),
1531 ..Default::default()
1532 }),
1533 );
1534 map.insert(
1535 SmolStr::new_static("overall"),
1536 LexObjectProperty::String(LexString {
1537 description: Some(
1538 CowStr::new_static(
1539 "Master speed multiplier that affects all animations (stored as string, e.g. '1.0' = normal speed)",
1540 ),
1541 ),
1542 max_length: Some(10usize),
1543 ..Default::default()
1544 }),
1545 );
1546 map.insert(
1547 SmolStr::new_static("pageTransitions"),
1548 LexObjectProperty::String(LexString {
1549 description: Some(
1550 CowStr::new_static(
1551 "Page transitions and navigation animations (stored as string)",
1552 ),
1553 ),
1554 max_length: Some(10usize),
1555 ..Default::default()
1556 }),
1557 );
1558 map.insert(
1559 SmolStr::new_static("threadTransitions"),
1560 LexObjectProperty::String(LexString {
1561 description: Some(
1562 CowStr::new_static(
1563 "Thread train sliding, entering, and exiting animations (stored as string)",
1564 ),
1565 ),
1566 max_length: Some(10usize),
1567 ..Default::default()
1568 }),
1569 );
1570 map.insert(
1571 SmolStr::new_static("uiTransitions"),
1572 LexObjectProperty::String(LexString {
1573 description: Some(
1574 CowStr::new_static(
1575 "Control row and feed subtitle fade in/out animations (stored as string)",
1576 ),
1577 ),
1578 max_length: Some(10usize),
1579 ..Default::default()
1580 }),
1581 );
1582 map
1583 },
1584 ..Default::default()
1585 }),
1586 );
1587 map.insert(
1588 SmolStr::new_static("batchNotificationTypes"),
1589 LexUserType::Object(LexObject {
1590 properties: {
1591 #[allow(unused_mut)]
1592 let mut map = BTreeMap::new();
1593 map.insert(
1594 SmolStr::new_static("follows"),
1595 LexObjectProperty::Boolean(LexBoolean {
1596 ..Default::default()
1597 }),
1598 );
1599 map.insert(
1600 SmolStr::new_static("likes"),
1601 LexObjectProperty::Boolean(LexBoolean {
1602 ..Default::default()
1603 }),
1604 );
1605 map.insert(
1606 SmolStr::new_static("mentions"),
1607 LexObjectProperty::Boolean(LexBoolean {
1608 ..Default::default()
1609 }),
1610 );
1611 map.insert(
1612 SmolStr::new_static("quotes"),
1613 LexObjectProperty::Boolean(LexBoolean {
1614 ..Default::default()
1615 }),
1616 );
1617 map.insert(
1618 SmolStr::new_static("replies"),
1619 LexObjectProperty::Boolean(LexBoolean {
1620 ..Default::default()
1621 }),
1622 );
1623 map.insert(
1624 SmolStr::new_static("reposts"),
1625 LexObjectProperty::Boolean(LexBoolean {
1626 ..Default::default()
1627 }),
1628 );
1629 map
1630 },
1631 ..Default::default()
1632 }),
1633 );
1634 map.insert(
1635 SmolStr::new_static("behaviorSettings"),
1636 LexUserType::Object(LexObject {
1637 description: Some(
1638 CowStr::new_static("App behavior and functionality settings"),
1639 ),
1640 properties: {
1641 #[allow(unused_mut)]
1642 let mut map = BTreeMap::new();
1643 map.insert(
1644 SmolStr::new_static("animationTiming"),
1645 LexObjectProperty::Ref(LexRef {
1646 r#ref: CowStr::new_static("#animationTiming"),
1647 ..Default::default()
1648 }),
1649 );
1650 map.insert(
1651 SmolStr::new_static("anisotaOnlyMode"),
1652 LexObjectProperty::Boolean(LexBoolean {
1653 ..Default::default()
1654 }),
1655 );
1656 map.insert(
1657 SmolStr::new_static("audioEnabled"),
1658 LexObjectProperty::Boolean(LexBoolean {
1659 ..Default::default()
1660 }),
1661 );
1662 map.insert(
1663 SmolStr::new_static("batchNotificationTypes"),
1664 LexObjectProperty::Ref(LexRef {
1665 r#ref: CowStr::new_static("#batchNotificationTypes"),
1666 ..Default::default()
1667 }),
1668 );
1669 map.insert(
1670 SmolStr::new_static("batchNotifications"),
1671 LexObjectProperty::Boolean(LexBoolean {
1672 ..Default::default()
1673 }),
1674 );
1675 map.insert(
1676 SmolStr::new_static("bypassDetachedQuotes"),
1677 LexObjectProperty::Boolean(LexBoolean {
1678 ..Default::default()
1679 }),
1680 );
1681 map.insert(
1682 SmolStr::new_static("combineRelationshipAndFollowerFilters"),
1683 LexObjectProperty::Boolean(LexBoolean {
1684 ..Default::default()
1685 }),
1686 );
1687 map.insert(
1688 SmolStr::new_static("confirmDeletes"),
1689 LexObjectProperty::Boolean(LexBoolean {
1690 ..Default::default()
1691 }),
1692 );
1693 map.insert(
1694 SmolStr::new_static("confirmDraftSaves"),
1695 LexObjectProperty::Boolean(LexBoolean {
1696 ..Default::default()
1697 }),
1698 );
1699 map.insert(
1700 SmolStr::new_static("defaultHomePage"),
1701 LexObjectProperty::String(LexString {
1702 description: Some(
1703 CowStr::new_static("Default page to show on app load"),
1704 ),
1705 ..Default::default()
1706 }),
1707 );
1708 map.insert(
1709 SmolStr::new_static("defaultPostTarget"),
1710 LexObjectProperty::String(LexString {
1711 description: Some(
1712 CowStr::new_static(
1713 "Default publishing target for new posts",
1714 ),
1715 ),
1716 ..Default::default()
1717 }),
1718 );
1719 map.insert(
1720 SmolStr::new_static("feedCacheLength"),
1721 LexObjectProperty::Integer(LexInteger {
1722 minimum: Some(1i64),
1723 ..Default::default()
1724 }),
1725 );
1726 map.insert(
1727 SmolStr::new_static("filterByFollowerRatio"),
1728 LexObjectProperty::Boolean(LexBoolean {
1729 ..Default::default()
1730 }),
1731 );
1732 map.insert(
1733 SmolStr::new_static("filterNotificationTypes"),
1734 LexObjectProperty::Ref(LexRef {
1735 r#ref: CowStr::new_static("#filterNotificationTypes"),
1736 ..Default::default()
1737 }),
1738 );
1739 map.insert(
1740 SmolStr::new_static("filterNotificationsByFollowers"),
1741 LexObjectProperty::Boolean(LexBoolean {
1742 ..Default::default()
1743 }),
1744 );
1745 map.insert(
1746 SmolStr::new_static("filterNotificationsByRelationship"),
1747 LexObjectProperty::Boolean(LexBoolean {
1748 ..Default::default()
1749 }),
1750 );
1751 map.insert(
1752 SmolStr::new_static("filterRelationshipTypes"),
1753 LexObjectProperty::Ref(LexRef {
1754 r#ref: CowStr::new_static("#filterRelationshipTypes"),
1755 ..Default::default()
1756 }),
1757 );
1758 map.insert(
1759 SmolStr::new_static("forceChronologicalSort"),
1760 LexObjectProperty::Boolean(LexBoolean {
1761 ..Default::default()
1762 }),
1763 );
1764 map.insert(
1765 SmolStr::new_static("fullscreenBehavior"),
1766 LexObjectProperty::String(LexString {
1767 description: Some(
1768 CowStr::new_static(
1769 "Fullscreen behavior mode: fullscreen (show control row), immersive (hide all UI), or cycle (cycle through states)",
1770 ),
1771 ),
1772 ..Default::default()
1773 }),
1774 );
1775 map.insert(
1776 SmolStr::new_static("hideInteractedPosts"),
1777 LexObjectProperty::Boolean(LexBoolean {
1778 ..Default::default()
1779 }),
1780 );
1781 map.insert(
1782 SmolStr::new_static("hideNotificationCount"),
1783 LexObjectProperty::Boolean(LexBoolean {
1784 ..Default::default()
1785 }),
1786 );
1787 map.insert(
1788 SmolStr::new_static("hideReadPosts"),
1789 LexObjectProperty::Boolean(LexBoolean {
1790 ..Default::default()
1791 }),
1792 );
1793 map.insert(
1794 SmolStr::new_static("hideReposts"),
1795 LexObjectProperty::Ref(LexRef {
1796 r#ref: CowStr::new_static("#hideReposts"),
1797 ..Default::default()
1798 }),
1799 );
1800 map.insert(
1801 SmolStr::new_static("highlightByFollowerRatio"),
1802 LexObjectProperty::Boolean(LexBoolean {
1803 ..Default::default()
1804 }),
1805 );
1806 map.insert(
1807 SmolStr::new_static("highlightMaxFollowerCount"),
1808 LexObjectProperty::Integer(LexInteger {
1809 ..Default::default()
1810 }),
1811 );
1812 map.insert(
1813 SmolStr::new_static("highlightMinFollowerCount"),
1814 LexObjectProperty::String(LexString {
1815 description: Some(
1816 CowStr::new_static(
1817 "Minimum follower count for notification highlighting (stored as string or integer)",
1818 ),
1819 ),
1820 max_length: Some(20usize),
1821 ..Default::default()
1822 }),
1823 );
1824 map.insert(
1825 SmolStr::new_static("highlightMinFollowerRatio"),
1826 LexObjectProperty::String(LexString {
1827 description: Some(
1828 CowStr::new_static(
1829 "Minimum follower-to-following ratio for highlighting (stored as string)",
1830 ),
1831 ),
1832 max_length: Some(20usize),
1833 ..Default::default()
1834 }),
1835 );
1836 map.insert(
1837 SmolStr::new_static("highlightNotificationTypes"),
1838 LexObjectProperty::Ref(LexRef {
1839 r#ref: CowStr::new_static("#highlightNotificationTypes"),
1840 ..Default::default()
1841 }),
1842 );
1843 map.insert(
1844 SmolStr::new_static("highlightNotifications"),
1845 LexObjectProperty::Boolean(LexBoolean {
1846 ..Default::default()
1847 }),
1848 );
1849 map.insert(
1850 SmolStr::new_static("includeReplyEngagement"),
1851 LexObjectProperty::Boolean(LexBoolean {
1852 ..Default::default()
1853 }),
1854 );
1855 map.insert(
1856 SmolStr::new_static("keyboardShortcuts"),
1857 LexObjectProperty::Ref(LexRef {
1858 r#ref: CowStr::new_static("#keyboardShortcuts"),
1859 ..Default::default()
1860 }),
1861 );
1862 map.insert(
1863 SmolStr::new_static("maxFollowerCount"),
1864 LexObjectProperty::Integer(LexInteger {
1865 ..Default::default()
1866 }),
1867 );
1868 map.insert(
1869 SmolStr::new_static("minFollowerCount"),
1870 LexObjectProperty::String(LexString {
1871 description: Some(
1872 CowStr::new_static(
1873 "Minimum follower count for notification filtering (stored as string)",
1874 ),
1875 ),
1876 max_length: Some(20usize),
1877 ..Default::default()
1878 }),
1879 );
1880 map.insert(
1881 SmolStr::new_static("minFollowerRatio"),
1882 LexObjectProperty::String(LexString {
1883 description: Some(
1884 CowStr::new_static(
1885 "Minimum follower ratio for filtering (stored as string)",
1886 ),
1887 ),
1888 max_length: Some(20usize),
1889 ..Default::default()
1890 }),
1891 );
1892 map.insert(
1893 SmolStr::new_static("moderationSettings"),
1894 LexObjectProperty::Ref(LexRef {
1895 r#ref: CowStr::new_static("#moderationSettings"),
1896 ..Default::default()
1897 }),
1898 );
1899 map.insert(
1900 SmolStr::new_static("postDrafts"),
1901 LexObjectProperty::Boolean(LexBoolean {
1902 ..Default::default()
1903 }),
1904 );
1905 map.insert(
1906 SmolStr::new_static("reverseFeedOrder"),
1907 LexObjectProperty::Boolean(LexBoolean {
1908 ..Default::default()
1909 }),
1910 );
1911 map.insert(
1912 SmolStr::new_static("showBlockedPosts"),
1913 LexObjectProperty::Boolean(LexBoolean {
1914 ..Default::default()
1915 }),
1916 );
1917 map.insert(
1918 SmolStr::new_static("showNewHighlightsSection"),
1919 LexObjectProperty::Boolean(LexBoolean {
1920 ..Default::default()
1921 }),
1922 );
1923 map.insert(
1924 SmolStr::new_static("showNotificationSections"),
1925 LexObjectProperty::Boolean(LexBoolean {
1926 ..Default::default()
1927 }),
1928 );
1929 map.insert(
1930 SmolStr::new_static("showOlderSection"),
1931 LexObjectProperty::Boolean(LexBoolean {
1932 ..Default::default()
1933 }),
1934 );
1935 map.insert(
1936 SmolStr::new_static("showRarityInHeader"),
1937 LexObjectProperty::Boolean(LexBoolean {
1938 ..Default::default()
1939 }),
1940 );
1941 map.insert(
1942 SmolStr::new_static("showRecentlyReadSection"),
1943 LexObjectProperty::Boolean(LexBoolean {
1944 ..Default::default()
1945 }),
1946 );
1947 map.insert(
1948 SmolStr::new_static("showThreadSuggestion"),
1949 LexObjectProperty::Boolean(LexBoolean {
1950 ..Default::default()
1951 }),
1952 );
1953 map.insert(
1954 SmolStr::new_static("showUnreadSection"),
1955 LexObjectProperty::Boolean(LexBoolean {
1956 ..Default::default()
1957 }),
1958 );
1959 map.insert(
1960 SmolStr::new_static("soundscape"),
1961 LexObjectProperty::String(LexString {
1962 description: Some(
1963 CowStr::new_static("Selected background audio soundscape"),
1964 ),
1965 ..Default::default()
1966 }),
1967 );
1968 map.insert(
1969 SmolStr::new_static("statsVisibleSections"),
1970 LexObjectProperty::Ref(LexRef {
1971 r#ref: CowStr::new_static("#statsVisibleSections"),
1972 ..Default::default()
1973 }),
1974 );
1975 map.insert(
1976 SmolStr::new_static("textOnlyMode"),
1977 LexObjectProperty::Boolean(LexBoolean {
1978 ..Default::default()
1979 }),
1980 );
1981 map.insert(
1982 SmolStr::new_static("trackReadPosts"),
1983 LexObjectProperty::Boolean(LexBoolean {
1984 ..Default::default()
1985 }),
1986 );
1987 map
1988 },
1989 ..Default::default()
1990 }),
1991 );
1992 map.insert(
1993 SmolStr::new_static("controlSettings"),
1994 LexUserType::Object(LexObject {
1995 description: Some(
1996 CowStr::new_static("Control button visibility settings"),
1997 ),
1998 properties: {
1999 #[allow(unused_mut)]
2000 let mut map = BTreeMap::new();
2001 map.insert(
2002 SmolStr::new_static("accountList"),
2003 LexObjectProperty::Boolean(LexBoolean {
2004 ..Default::default()
2005 }),
2006 );
2007 map.insert(
2008 SmolStr::new_static("back"),
2009 LexObjectProperty::Boolean(LexBoolean {
2010 ..Default::default()
2011 }),
2012 );
2013 map.insert(
2014 SmolStr::new_static("commentButton"),
2015 LexObjectProperty::Boolean(LexBoolean {
2016 ..Default::default()
2017 }),
2018 );
2019 map.insert(
2020 SmolStr::new_static("copyAuthorDID"),
2021 LexObjectProperty::Boolean(LexBoolean {
2022 ..Default::default()
2023 }),
2024 );
2025 map.insert(
2026 SmolStr::new_static("copyButton"),
2027 LexObjectProperty::Boolean(LexBoolean {
2028 ..Default::default()
2029 }),
2030 );
2031 map.insert(
2032 SmolStr::new_static("copyPostLink"),
2033 LexObjectProperty::Boolean(LexBoolean {
2034 ..Default::default()
2035 }),
2036 );
2037 map.insert(
2038 SmolStr::new_static("copyPostText"),
2039 LexObjectProperty::Boolean(LexBoolean {
2040 ..Default::default()
2041 }),
2042 );
2043 map.insert(
2044 SmolStr::new_static("delete"),
2045 LexObjectProperty::Boolean(LexBoolean {
2046 ..Default::default()
2047 }),
2048 );
2049 map.insert(
2050 SmolStr::new_static("engageButton"),
2051 LexObjectProperty::Boolean(LexBoolean {
2052 ..Default::default()
2053 }),
2054 );
2055 map.insert(
2056 SmolStr::new_static("feedSwitcher"),
2057 LexObjectProperty::Boolean(LexBoolean {
2058 ..Default::default()
2059 }),
2060 );
2061 map.insert(
2062 SmolStr::new_static("fetch"),
2063 LexObjectProperty::Boolean(LexBoolean {
2064 ..Default::default()
2065 }),
2066 );
2067 map.insert(
2068 SmolStr::new_static("flip"),
2069 LexObjectProperty::Boolean(LexBoolean {
2070 ..Default::default()
2071 }),
2072 );
2073 map.insert(
2074 SmolStr::new_static("forward"),
2075 LexObjectProperty::Boolean(LexBoolean {
2076 ..Default::default()
2077 }),
2078 );
2079 map.insert(
2080 SmolStr::new_static("fullscreen"),
2081 LexObjectProperty::Boolean(LexBoolean {
2082 ..Default::default()
2083 }),
2084 );
2085 map.insert(
2086 SmolStr::new_static("leafletPublications"),
2087 LexObjectProperty::Boolean(LexBoolean {
2088 ..Default::default()
2089 }),
2090 );
2091 map.insert(
2092 SmolStr::new_static("like"),
2093 LexObjectProperty::Boolean(LexBoolean {
2094 ..Default::default()
2095 }),
2096 );
2097 map.insert(
2098 SmolStr::new_static("list"),
2099 LexObjectProperty::Boolean(LexBoolean {
2100 ..Default::default()
2101 }),
2102 );
2103 map.insert(
2104 SmolStr::new_static("multiEngageButton"),
2105 LexObjectProperty::Boolean(LexBoolean {
2106 ..Default::default()
2107 }),
2108 );
2109 map.insert(
2110 SmolStr::new_static("multiRepostButton"),
2111 LexObjectProperty::Boolean(LexBoolean {
2112 ..Default::default()
2113 }),
2114 );
2115 map.insert(
2116 SmolStr::new_static("positionButton"),
2117 LexObjectProperty::Boolean(LexBoolean {
2118 ..Default::default()
2119 }),
2120 );
2121 map.insert(
2122 SmolStr::new_static("postList"),
2123 LexObjectProperty::Boolean(LexBoolean {
2124 ..Default::default()
2125 }),
2126 );
2127 map.insert(
2128 SmolStr::new_static("quickAccess"),
2129 LexObjectProperty::Boolean(LexBoolean {
2130 ..Default::default()
2131 }),
2132 );
2133 map.insert(
2134 SmolStr::new_static("quote"),
2135 LexObjectProperty::Boolean(LexBoolean {
2136 ..Default::default()
2137 }),
2138 );
2139 map.insert(
2140 SmolStr::new_static("relationshipButton"),
2141 LexObjectProperty::Boolean(LexBoolean {
2142 ..Default::default()
2143 }),
2144 );
2145 map.insert(
2146 SmolStr::new_static("reply"),
2147 LexObjectProperty::Boolean(LexBoolean {
2148 ..Default::default()
2149 }),
2150 );
2151 map.insert(
2152 SmolStr::new_static("repost"),
2153 LexObjectProperty::Boolean(LexBoolean {
2154 ..Default::default()
2155 }),
2156 );
2157 map.insert(
2158 SmolStr::new_static("shuffle"),
2159 LexObjectProperty::Boolean(LexBoolean {
2160 ..Default::default()
2161 }),
2162 );
2163 map.insert(
2164 SmolStr::new_static("textOnlyMode"),
2165 LexObjectProperty::Boolean(LexBoolean {
2166 ..Default::default()
2167 }),
2168 );
2169 map
2170 },
2171 ..Default::default()
2172 }),
2173 );
2174 map.insert(
2175 SmolStr::new_static("cornerElements"),
2176 LexUserType::Object(LexObject {
2177 description: Some(
2178 CowStr::new_static("Corner element positioning settings"),
2179 ),
2180 properties: {
2181 #[allow(unused_mut)]
2182 let mut map = BTreeMap::new();
2183 map.insert(
2184 SmolStr::new_static("bottomLeft"),
2185 LexObjectProperty::String(LexString {
2186 description: Some(
2187 CowStr::new_static("Element to show in bottom left corner"),
2188 ),
2189 ..Default::default()
2190 }),
2191 );
2192 map.insert(
2193 SmolStr::new_static("bottomRight"),
2194 LexObjectProperty::String(LexString {
2195 description: Some(
2196 CowStr::new_static("Element to show in bottom right corner"),
2197 ),
2198 ..Default::default()
2199 }),
2200 );
2201 map.insert(
2202 SmolStr::new_static("topLeft"),
2203 LexObjectProperty::String(LexString {
2204 description: Some(
2205 CowStr::new_static("Element to show in top left corner"),
2206 ),
2207 ..Default::default()
2208 }),
2209 );
2210 map.insert(
2211 SmolStr::new_static("topRight"),
2212 LexObjectProperty::String(LexString {
2213 description: Some(
2214 CowStr::new_static("Element to show in top right corner"),
2215 ),
2216 ..Default::default()
2217 }),
2218 );
2219 map
2220 },
2221 ..Default::default()
2222 }),
2223 );
2224 map.insert(
2225 SmolStr::new_static("filterNotificationTypes"),
2226 LexUserType::Object(LexObject {
2227 properties: {
2228 #[allow(unused_mut)]
2229 let mut map = BTreeMap::new();
2230 map.insert(
2231 SmolStr::new_static("follows"),
2232 LexObjectProperty::Boolean(LexBoolean {
2233 ..Default::default()
2234 }),
2235 );
2236 map.insert(
2237 SmolStr::new_static("likes"),
2238 LexObjectProperty::Boolean(LexBoolean {
2239 ..Default::default()
2240 }),
2241 );
2242 map.insert(
2243 SmolStr::new_static("mentions"),
2244 LexObjectProperty::Boolean(LexBoolean {
2245 ..Default::default()
2246 }),
2247 );
2248 map.insert(
2249 SmolStr::new_static("quotes"),
2250 LexObjectProperty::Boolean(LexBoolean {
2251 ..Default::default()
2252 }),
2253 );
2254 map.insert(
2255 SmolStr::new_static("replies"),
2256 LexObjectProperty::Boolean(LexBoolean {
2257 ..Default::default()
2258 }),
2259 );
2260 map.insert(
2261 SmolStr::new_static("reposts"),
2262 LexObjectProperty::Boolean(LexBoolean {
2263 ..Default::default()
2264 }),
2265 );
2266 map
2267 },
2268 ..Default::default()
2269 }),
2270 );
2271 map.insert(
2272 SmolStr::new_static("filterRelationshipTypes"),
2273 LexUserType::Object(LexObject {
2274 properties: {
2275 #[allow(unused_mut)]
2276 let mut map = BTreeMap::new();
2277 map.insert(
2278 SmolStr::new_static("followers"),
2279 LexObjectProperty::Boolean(LexBoolean {
2280 ..Default::default()
2281 }),
2282 );
2283 map.insert(
2284 SmolStr::new_static("following"),
2285 LexObjectProperty::Boolean(LexBoolean {
2286 ..Default::default()
2287 }),
2288 );
2289 map.insert(
2290 SmolStr::new_static("mutuals"),
2291 LexObjectProperty::Boolean(LexBoolean {
2292 ..Default::default()
2293 }),
2294 );
2295 map.insert(
2296 SmolStr::new_static("nonMutuals"),
2297 LexObjectProperty::Boolean(LexBoolean {
2298 ..Default::default()
2299 }),
2300 );
2301 map
2302 },
2303 ..Default::default()
2304 }),
2305 );
2306 map.insert(
2307 SmolStr::new_static("hideReposts"),
2308 LexUserType::Object(LexObject {
2309 properties: {
2310 #[allow(unused_mut)]
2311 let mut map = BTreeMap::new();
2312 map.insert(
2313 SmolStr::new_static("feed"),
2314 LexObjectProperty::Boolean(LexBoolean {
2315 ..Default::default()
2316 }),
2317 );
2318 map.insert(
2319 SmolStr::new_static("profile"),
2320 LexObjectProperty::Boolean(LexBoolean {
2321 ..Default::default()
2322 }),
2323 );
2324 map
2325 },
2326 ..Default::default()
2327 }),
2328 );
2329 map.insert(
2330 SmolStr::new_static("highlightNotificationTypes"),
2331 LexUserType::Object(LexObject {
2332 properties: {
2333 #[allow(unused_mut)]
2334 let mut map = BTreeMap::new();
2335 map.insert(
2336 SmolStr::new_static("follows"),
2337 LexObjectProperty::Boolean(LexBoolean {
2338 ..Default::default()
2339 }),
2340 );
2341 map.insert(
2342 SmolStr::new_static("likes"),
2343 LexObjectProperty::Boolean(LexBoolean {
2344 ..Default::default()
2345 }),
2346 );
2347 map.insert(
2348 SmolStr::new_static("mentions"),
2349 LexObjectProperty::Boolean(LexBoolean {
2350 ..Default::default()
2351 }),
2352 );
2353 map.insert(
2354 SmolStr::new_static("quotes"),
2355 LexObjectProperty::Boolean(LexBoolean {
2356 ..Default::default()
2357 }),
2358 );
2359 map.insert(
2360 SmolStr::new_static("replies"),
2361 LexObjectProperty::Boolean(LexBoolean {
2362 ..Default::default()
2363 }),
2364 );
2365 map.insert(
2366 SmolStr::new_static("reposts"),
2367 LexObjectProperty::Boolean(LexBoolean {
2368 ..Default::default()
2369 }),
2370 );
2371 map
2372 },
2373 ..Default::default()
2374 }),
2375 );
2376 map.insert(
2377 SmolStr::new_static("keyboardShortcuts"),
2378 LexUserType::Object(LexObject {
2379 description: Some(
2380 CowStr::new_static("Keyboard shortcut configuration"),
2381 ),
2382 properties: {
2383 #[allow(unused_mut)]
2384 let mut map = BTreeMap::new();
2385 map.insert(
2386 SmolStr::new_static("composer"),
2387 LexObjectProperty::Ref(LexRef {
2388 r#ref: CowStr::new_static("#keyboardShortcutsComposer"),
2389 ..Default::default()
2390 }),
2391 );
2392 map.insert(
2393 SmolStr::new_static("global"),
2394 LexObjectProperty::Ref(LexRef {
2395 r#ref: CowStr::new_static("#keyboardShortcutsGlobal"),
2396 ..Default::default()
2397 }),
2398 );
2399 map.insert(
2400 SmolStr::new_static("modals"),
2401 LexObjectProperty::Ref(LexRef {
2402 r#ref: CowStr::new_static("#keyboardShortcutsModals"),
2403 ..Default::default()
2404 }),
2405 );
2406 map.insert(
2407 SmolStr::new_static("navigation"),
2408 LexObjectProperty::Ref(LexRef {
2409 r#ref: CowStr::new_static("#keyboardShortcutsNavigation"),
2410 ..Default::default()
2411 }),
2412 );
2413 map.insert(
2414 SmolStr::new_static("postInteractions"),
2415 LexObjectProperty::Ref(LexRef {
2416 r#ref: CowStr::new_static(
2417 "#keyboardShortcutsPostInteractions",
2418 ),
2419 ..Default::default()
2420 }),
2421 );
2422 map
2423 },
2424 ..Default::default()
2425 }),
2426 );
2427 map.insert(
2428 SmolStr::new_static("keyboardShortcutsComposer"),
2429 LexUserType::Object(LexObject {
2430 description: Some(
2431 CowStr::new_static("Post composer keyboard shortcuts"),
2432 ),
2433 properties: {
2434 #[allow(unused_mut)]
2435 let mut map = BTreeMap::new();
2436 map.insert(
2437 SmolStr::new_static("publish"),
2438 LexObjectProperty::String(LexString {
2439 description: Some(
2440 CowStr::new_static("Publish post (e.g., ctrl+enter)"),
2441 ),
2442 max_length: Some(50usize),
2443 ..Default::default()
2444 }),
2445 );
2446 map
2447 },
2448 ..Default::default()
2449 }),
2450 );
2451 map.insert(
2452 SmolStr::new_static("keyboardShortcutsGlobal"),
2453 LexUserType::Object(LexObject {
2454 description: Some(
2455 CowStr::new_static("Global navigation keyboard shortcuts"),
2456 ),
2457 properties: {
2458 #[allow(unused_mut)]
2459 let mut map = BTreeMap::new();
2460 map.insert(
2461 SmolStr::new_static("collection"),
2462 LexObjectProperty::String(LexString {
2463 description: Some(
2464 CowStr::new_static("Navigate to collection"),
2465 ),
2466 max_length: Some(50usize),
2467 ..Default::default()
2468 }),
2469 );
2470 map.insert(
2471 SmolStr::new_static("feed"),
2472 LexObjectProperty::String(LexString {
2473 description: Some(CowStr::new_static("Navigate to feed")),
2474 max_length: Some(50usize),
2475 ..Default::default()
2476 }),
2477 );
2478 map.insert(
2479 SmolStr::new_static("inventory"),
2480 LexObjectProperty::String(LexString {
2481 description: Some(
2482 CowStr::new_static("Navigate to inventory"),
2483 ),
2484 max_length: Some(50usize),
2485 ..Default::default()
2486 }),
2487 );
2488 map.insert(
2489 SmolStr::new_static("profile"),
2490 LexObjectProperty::String(LexString {
2491 description: Some(
2492 CowStr::new_static("Navigate to profile"),
2493 ),
2494 max_length: Some(50usize),
2495 ..Default::default()
2496 }),
2497 );
2498 map
2499 },
2500 ..Default::default()
2501 }),
2502 );
2503 map.insert(
2504 SmolStr::new_static("keyboardShortcutsModals"),
2505 LexUserType::Object(LexObject {
2506 description: Some(CowStr::new_static("Modal keyboard shortcuts")),
2507 properties: {
2508 #[allow(unused_mut)]
2509 let mut map = BTreeMap::new();
2510 map.insert(
2511 SmolStr::new_static("keyboardHelp"),
2512 LexObjectProperty::String(LexString {
2513 description: Some(
2514 CowStr::new_static("Show keyboard shortcuts help"),
2515 ),
2516 max_length: Some(50usize),
2517 ..Default::default()
2518 }),
2519 );
2520 map.insert(
2521 SmolStr::new_static("notifications"),
2522 LexObjectProperty::String(LexString {
2523 description: Some(CowStr::new_static("Open notifications")),
2524 max_length: Some(50usize),
2525 ..Default::default()
2526 }),
2527 );
2528 map.insert(
2529 SmolStr::new_static("postComposer"),
2530 LexObjectProperty::String(LexString {
2531 description: Some(CowStr::new_static("Open post composer")),
2532 max_length: Some(50usize),
2533 ..Default::default()
2534 }),
2535 );
2536 map.insert(
2537 SmolStr::new_static("stats"),
2538 LexObjectProperty::String(LexString {
2539 description: Some(CowStr::new_static("Open stats modal")),
2540 max_length: Some(50usize),
2541 ..Default::default()
2542 }),
2543 );
2544 map.insert(
2545 SmolStr::new_static("touchMenu"),
2546 LexObjectProperty::String(LexString {
2547 description: Some(CowStr::new_static("Open touch menu")),
2548 max_length: Some(50usize),
2549 ..Default::default()
2550 }),
2551 );
2552 map
2553 },
2554 ..Default::default()
2555 }),
2556 );
2557 map.insert(
2558 SmolStr::new_static("keyboardShortcutsNavigation"),
2559 LexUserType::Object(LexObject {
2560 description: Some(
2561 CowStr::new_static("Navigation keyboard shortcuts"),
2562 ),
2563 properties: {
2564 #[allow(unused_mut)]
2565 let mut map = BTreeMap::new();
2566 map.insert(
2567 SmolStr::new_static("arrowDown"),
2568 LexObjectProperty::String(LexString {
2569 description: Some(
2570 CowStr::new_static("Scroll down or next item"),
2571 ),
2572 max_length: Some(50usize),
2573 ..Default::default()
2574 }),
2575 );
2576 map.insert(
2577 SmolStr::new_static("arrowLeft"),
2578 LexObjectProperty::String(LexString {
2579 description: Some(
2580 CowStr::new_static("Go back to previous card"),
2581 ),
2582 max_length: Some(50usize),
2583 ..Default::default()
2584 }),
2585 );
2586 map.insert(
2587 SmolStr::new_static("arrowRight"),
2588 LexObjectProperty::String(LexString {
2589 description: Some(
2590 CowStr::new_static("Advance to next card"),
2591 ),
2592 max_length: Some(50usize),
2593 ..Default::default()
2594 }),
2595 );
2596 map.insert(
2597 SmolStr::new_static("arrowUp"),
2598 LexObjectProperty::String(LexString {
2599 description: Some(
2600 CowStr::new_static("Scroll up or previous item"),
2601 ),
2602 max_length: Some(50usize),
2603 ..Default::default()
2604 }),
2605 );
2606 map.insert(
2607 SmolStr::new_static("escape"),
2608 LexObjectProperty::String(LexString {
2609 description: Some(
2610 CowStr::new_static("Exit fullscreen or close modals"),
2611 ),
2612 max_length: Some(50usize),
2613 ..Default::default()
2614 }),
2615 );
2616 map
2617 },
2618 ..Default::default()
2619 }),
2620 );
2621 map.insert(
2622 SmolStr::new_static("keyboardShortcutsPostInteractions"),
2623 LexUserType::Object(LexObject {
2624 description: Some(
2625 CowStr::new_static("Post interaction keyboard shortcuts"),
2626 ),
2627 properties: {
2628 #[allow(unused_mut)]
2629 let mut map = BTreeMap::new();
2630 map.insert(
2631 SmolStr::new_static("like"),
2632 LexObjectProperty::String(LexString {
2633 description: Some(CowStr::new_static("Like current post")),
2634 max_length: Some(50usize),
2635 ..Default::default()
2636 }),
2637 );
2638 map.insert(
2639 SmolStr::new_static("quote"),
2640 LexObjectProperty::String(LexString {
2641 description: Some(CowStr::new_static("Quote current post")),
2642 max_length: Some(50usize),
2643 ..Default::default()
2644 }),
2645 );
2646 map.insert(
2647 SmolStr::new_static("reply"),
2648 LexObjectProperty::String(LexString {
2649 description: Some(
2650 CowStr::new_static("Reply to current post"),
2651 ),
2652 max_length: Some(50usize),
2653 ..Default::default()
2654 }),
2655 );
2656 map.insert(
2657 SmolStr::new_static("repost"),
2658 LexObjectProperty::String(LexString {
2659 description: Some(
2660 CowStr::new_static("Repost current post"),
2661 ),
2662 max_length: Some(50usize),
2663 ..Default::default()
2664 }),
2665 );
2666 map
2667 },
2668 ..Default::default()
2669 }),
2670 );
2671 map.insert(
2672 SmolStr::new_static("main"),
2673 LexUserType::Record(LexRecord {
2674 description: Some(
2675 CowStr::new_static(
2676 "User settings for the Anisota app, synchronized across devices via ATProto",
2677 ),
2678 ),
2679 key: Some(CowStr::new_static("literal:settings")),
2680 record: LexRecordRecord::Object(LexObject {
2681 required: Some(
2682 vec![
2683 SmolStr::new_static("version"),
2684 SmolStr::new_static("createdAt"),
2685 SmolStr::new_static("updatedAt")
2686 ],
2687 ),
2688 properties: {
2689 #[allow(unused_mut)]
2690 let mut map = BTreeMap::new();
2691 map.insert(
2692 SmolStr::new_static("behaviorSettings"),
2693 LexObjectProperty::Ref(LexRef {
2694 r#ref: CowStr::new_static("#behaviorSettings"),
2695 ..Default::default()
2696 }),
2697 );
2698 map.insert(
2699 SmolStr::new_static("controlOrder"),
2700 LexObjectProperty::Array(LexArray {
2701 description: Some(
2702 CowStr::new_static("Order of control buttons"),
2703 ),
2704 items: LexArrayItem::String(LexString {
2705 ..Default::default()
2706 }),
2707 ..Default::default()
2708 }),
2709 );
2710 map.insert(
2711 SmolStr::new_static("controlSettings"),
2712 LexObjectProperty::Ref(LexRef {
2713 r#ref: CowStr::new_static("#controlSettings"),
2714 ..Default::default()
2715 }),
2716 );
2717 map.insert(
2718 SmolStr::new_static("createdAt"),
2719 LexObjectProperty::String(LexString {
2720 description: Some(
2721 CowStr::new_static(
2722 "When the settings record was first created",
2723 ),
2724 ),
2725 format: Some(LexStringFormat::Datetime),
2726 ..Default::default()
2727 }),
2728 );
2729 map.insert(
2730 SmolStr::new_static("theme"),
2731 LexObjectProperty::String(LexString {
2732 description: Some(
2733 CowStr::new_static("Selected color theme"),
2734 ),
2735 ..Default::default()
2736 }),
2737 );
2738 map.insert(
2739 SmolStr::new_static("uiSettings"),
2740 LexObjectProperty::Ref(LexRef {
2741 r#ref: CowStr::new_static("#uiSettings"),
2742 ..Default::default()
2743 }),
2744 );
2745 map.insert(
2746 SmolStr::new_static("updatedAt"),
2747 LexObjectProperty::String(LexString {
2748 description: Some(
2749 CowStr::new_static("When the settings were last updated"),
2750 ),
2751 format: Some(LexStringFormat::Datetime),
2752 ..Default::default()
2753 }),
2754 );
2755 map.insert(
2756 SmolStr::new_static("version"),
2757 LexObjectProperty::Integer(LexInteger {
2758 minimum: Some(1i64),
2759 ..Default::default()
2760 }),
2761 );
2762 map
2763 },
2764 ..Default::default()
2765 }),
2766 ..Default::default()
2767 }),
2768 );
2769 map.insert(
2770 SmolStr::new_static("moderationSettings"),
2771 LexUserType::Object(LexObject {
2772 description: Some(
2773 CowStr::new_static("Content moderation and filtering settings"),
2774 ),
2775 properties: {
2776 #[allow(unused_mut)]
2777 let mut map = BTreeMap::new();
2778 map.insert(
2779 SmolStr::new_static("mutedAccountsHandling"),
2780 LexObjectProperty::String(LexString {
2781 description: Some(
2782 CowStr::new_static(
2783 "How to handle posts from muted accounts",
2784 ),
2785 ),
2786 ..Default::default()
2787 }),
2788 );
2789 map.insert(
2790 SmolStr::new_static("mutedContentHandling"),
2791 LexObjectProperty::String(LexString {
2792 description: Some(
2793 CowStr::new_static(
2794 "How to handle posts containing muted words or phrases",
2795 ),
2796 ),
2797 ..Default::default()
2798 }),
2799 );
2800 map
2801 },
2802 ..Default::default()
2803 }),
2804 );
2805 map.insert(
2806 SmolStr::new_static("statsVisibleSections"),
2807 LexUserType::Object(LexObject {
2808 properties: {
2809 #[allow(unused_mut)]
2810 let mut map = BTreeMap::new();
2811 map.insert(
2812 SmolStr::new_static("activity"),
2813 LexObjectProperty::Boolean(LexBoolean {
2814 ..Default::default()
2815 }),
2816 );
2817 map.insert(
2818 SmolStr::new_static("engagement"),
2819 LexObjectProperty::Boolean(LexBoolean {
2820 ..Default::default()
2821 }),
2822 );
2823 map.insert(
2824 SmolStr::new_static("progress"),
2825 LexObjectProperty::Boolean(LexBoolean {
2826 ..Default::default()
2827 }),
2828 );
2829 map
2830 },
2831 ..Default::default()
2832 }),
2833 );
2834 map.insert(
2835 SmolStr::new_static("uiSettings"),
2836 LexUserType::Object(LexObject {
2837 description: Some(
2838 CowStr::new_static("UI visibility and behavior settings"),
2839 ),
2840 properties: {
2841 #[allow(unused_mut)]
2842 let mut map = BTreeMap::new();
2843 map.insert(
2844 SmolStr::new_static("cornerElements"),
2845 LexObjectProperty::Ref(LexRef {
2846 r#ref: CowStr::new_static("#cornerElements"),
2847 ..Default::default()
2848 }),
2849 );
2850 map.insert(
2851 SmolStr::new_static("fontSize"),
2852 LexObjectProperty::String(LexString {
2853 description: Some(
2854 CowStr::new_static(
2855 "Font size scale (0.8 = 80%, 1.0 = 100% default, 1.2 = 120%)",
2856 ),
2857 ),
2858 max_length: Some(10usize),
2859 ..Default::default()
2860 }),
2861 );
2862 map.insert(
2863 SmolStr::new_static("postCardPrimarySlot"),
2864 LexObjectProperty::String(LexString {
2865 description: Some(
2866 CowStr::new_static("Primary name slot for post cards"),
2867 ),
2868 ..Default::default()
2869 }),
2870 );
2871 map.insert(
2872 SmolStr::new_static("postCardSecondarySlot"),
2873 LexObjectProperty::String(LexString {
2874 description: Some(
2875 CowStr::new_static("Secondary name slot for post cards"),
2876 ),
2877 ..Default::default()
2878 }),
2879 );
2880 map.insert(
2881 SmolStr::new_static("profileCardPrimarySlot"),
2882 LexObjectProperty::String(LexString {
2883 description: Some(
2884 CowStr::new_static("Primary name slot for profile cards"),
2885 ),
2886 ..Default::default()
2887 }),
2888 );
2889 map.insert(
2890 SmolStr::new_static("profileCardSecondarySlot"),
2891 LexObjectProperty::String(LexString {
2892 description: Some(
2893 CowStr::new_static("Secondary name slot for profile cards"),
2894 ),
2895 ..Default::default()
2896 }),
2897 );
2898 map.insert(
2899 SmolStr::new_static("showPostCardAtSymbol"),
2900 LexObjectProperty::Boolean(LexBoolean {
2901 ..Default::default()
2902 }),
2903 );
2904 map.insert(
2905 SmolStr::new_static("showPostCardAvatar"),
2906 LexObjectProperty::Boolean(LexBoolean {
2907 ..Default::default()
2908 }),
2909 );
2910 map.insert(
2911 SmolStr::new_static("showPostCardDisplayName"),
2912 LexObjectProperty::Boolean(LexBoolean {
2913 ..Default::default()
2914 }),
2915 );
2916 map.insert(
2917 SmolStr::new_static("showPostCardFooter"),
2918 LexObjectProperty::Boolean(LexBoolean {
2919 ..Default::default()
2920 }),
2921 );
2922 map.insert(
2923 SmolStr::new_static("showPostCardHandle"),
2924 LexObjectProperty::Boolean(LexBoolean {
2925 ..Default::default()
2926 }),
2927 );
2928 map.insert(
2929 SmolStr::new_static("showPostCardHeader"),
2930 LexObjectProperty::Boolean(LexBoolean {
2931 ..Default::default()
2932 }),
2933 );
2934 map.insert(
2935 SmolStr::new_static("showPostCount"),
2936 LexObjectProperty::Boolean(LexBoolean {
2937 ..Default::default()
2938 }),
2939 );
2940 map.insert(
2941 SmolStr::new_static("showPostReadIndicator"),
2942 LexObjectProperty::Boolean(LexBoolean {
2943 ..Default::default()
2944 }),
2945 );
2946 map.insert(
2947 SmolStr::new_static("showProfileAtSymbol"),
2948 LexObjectProperty::Boolean(LexBoolean {
2949 ..Default::default()
2950 }),
2951 );
2952 map.insert(
2953 SmolStr::new_static("showProfileBlocked"),
2954 LexObjectProperty::Boolean(LexBoolean {
2955 ..Default::default()
2956 }),
2957 );
2958 map.insert(
2959 SmolStr::new_static("showProfileBlocking"),
2960 LexObjectProperty::Boolean(LexBoolean {
2961 ..Default::default()
2962 }),
2963 );
2964 map.insert(
2965 SmolStr::new_static("showProfileCancelled"),
2966 LexObjectProperty::Boolean(LexBoolean {
2967 ..Default::default()
2968 }),
2969 );
2970 map.insert(
2971 SmolStr::new_static("showProfileCancelling"),
2972 LexObjectProperty::Boolean(LexBoolean {
2973 ..Default::default()
2974 }),
2975 );
2976 map.insert(
2977 SmolStr::new_static("showProfileCardAvatar"),
2978 LexObjectProperty::Boolean(LexBoolean {
2979 ..Default::default()
2980 }),
2981 );
2982 map.insert(
2983 SmolStr::new_static("showProfileCardFooter"),
2984 LexObjectProperty::Boolean(LexBoolean {
2985 ..Default::default()
2986 }),
2987 );
2988 map.insert(
2989 SmolStr::new_static("showProfileCardHeader"),
2990 LexObjectProperty::Boolean(LexBoolean {
2991 ..Default::default()
2992 }),
2993 );
2994 map.insert(
2995 SmolStr::new_static("showProfileCollections"),
2996 LexObjectProperty::Boolean(LexBoolean {
2997 ..Default::default()
2998 }),
2999 );
3000 map.insert(
3001 SmolStr::new_static("showProfileDisplayName"),
3002 LexObjectProperty::Boolean(LexBoolean {
3003 ..Default::default()
3004 }),
3005 );
3006 map.insert(
3007 SmolStr::new_static("showProfileFollowers"),
3008 LexObjectProperty::Boolean(LexBoolean {
3009 ..Default::default()
3010 }),
3011 );
3012 map.insert(
3013 SmolStr::new_static("showProfileFollowing"),
3014 LexObjectProperty::Boolean(LexBoolean {
3015 ..Default::default()
3016 }),
3017 );
3018 map.insert(
3019 SmolStr::new_static("showProfileHandle"),
3020 LexObjectProperty::Boolean(LexBoolean {
3021 ..Default::default()
3022 }),
3023 );
3024 map.insert(
3025 SmolStr::new_static("showProfileLexicons"),
3026 LexObjectProperty::Boolean(LexBoolean {
3027 ..Default::default()
3028 }),
3029 );
3030 map.insert(
3031 SmolStr::new_static("showProfileListed"),
3032 LexObjectProperty::Boolean(LexBoolean {
3033 ..Default::default()
3034 }),
3035 );
3036 map.insert(
3037 SmolStr::new_static("showProfileListing"),
3038 LexObjectProperty::Boolean(LexBoolean {
3039 ..Default::default()
3040 }),
3041 );
3042 map.insert(
3043 SmolStr::new_static("showProfileLists"),
3044 LexObjectProperty::Boolean(LexBoolean {
3045 ..Default::default()
3046 }),
3047 );
3048 map.insert(
3049 SmolStr::new_static("showProfilePosts"),
3050 LexObjectProperty::Boolean(LexBoolean {
3051 ..Default::default()
3052 }),
3053 );
3054 map.insert(
3055 SmolStr::new_static("showProfilePronouns"),
3056 LexObjectProperty::Boolean(LexBoolean {
3057 ..Default::default()
3058 }),
3059 );
3060 map.insert(
3061 SmolStr::new_static("showProfileVerified"),
3062 LexObjectProperty::Boolean(LexBoolean {
3063 ..Default::default()
3064 }),
3065 );
3066 map.insert(
3067 SmolStr::new_static("showProfileVerifying"),
3068 LexObjectProperty::Boolean(LexBoolean {
3069 ..Default::default()
3070 }),
3071 );
3072 map.insert(
3073 SmolStr::new_static("showProfileWebsite"),
3074 LexObjectProperty::Boolean(LexBoolean {
3075 ..Default::default()
3076 }),
3077 );
3078 map.insert(
3079 SmolStr::new_static("showRarityIndicator"),
3080 LexObjectProperty::Boolean(LexBoolean {
3081 ..Default::default()
3082 }),
3083 );
3084 map.insert(
3085 SmolStr::new_static("showTimestamp"),
3086 LexObjectProperty::Boolean(LexBoolean {
3087 ..Default::default()
3088 }),
3089 );
3090 map.insert(
3091 SmolStr::new_static("showUsername"),
3092 LexObjectProperty::Boolean(LexBoolean {
3093 ..Default::default()
3094 }),
3095 );
3096 map
3097 },
3098 ..Default::default()
3099 }),
3100 );
3101 map
3102 },
3103 ..Default::default()
3104 }
3105}
3106
3107pub mod settings_state {
3108
3109 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
3110 #[allow(unused)]
3111 use ::core::marker::PhantomData;
3112 mod sealed {
3113 pub trait Sealed {}
3114 }
3115 pub trait State: sealed::Sealed {
3117 type CreatedAt;
3118 type UpdatedAt;
3119 type Version;
3120 }
3121 pub struct Empty(());
3123 impl sealed::Sealed for Empty {}
3124 impl State for Empty {
3125 type CreatedAt = Unset;
3126 type UpdatedAt = Unset;
3127 type Version = Unset;
3128 }
3129 pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
3131 impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
3132 impl<St: State> State for SetCreatedAt<St> {
3133 type CreatedAt = Set<members::created_at>;
3134 type UpdatedAt = St::UpdatedAt;
3135 type Version = St::Version;
3136 }
3137 pub struct SetUpdatedAt<St: State = Empty>(PhantomData<fn() -> St>);
3139 impl<St: State> sealed::Sealed for SetUpdatedAt<St> {}
3140 impl<St: State> State for SetUpdatedAt<St> {
3141 type CreatedAt = St::CreatedAt;
3142 type UpdatedAt = Set<members::updated_at>;
3143 type Version = St::Version;
3144 }
3145 pub struct SetVersion<St: State = Empty>(PhantomData<fn() -> St>);
3147 impl<St: State> sealed::Sealed for SetVersion<St> {}
3148 impl<St: State> State for SetVersion<St> {
3149 type CreatedAt = St::CreatedAt;
3150 type UpdatedAt = St::UpdatedAt;
3151 type Version = Set<members::version>;
3152 }
3153 #[allow(non_camel_case_types)]
3155 pub mod members {
3156 pub struct created_at(());
3158 pub struct updated_at(());
3160 pub struct version(());
3162 }
3163}
3164
3165pub struct SettingsBuilder<St: settings_state::State, S: BosStr = DefaultStr> {
3167 _state: PhantomData<fn() -> St>,
3168 _fields: (
3169 Option<settings::BehaviorSettings<S>>,
3170 Option<Vec<S>>,
3171 Option<settings::ControlSettings<S>>,
3172 Option<Datetime>,
3173 Option<S>,
3174 Option<settings::UiSettings<S>>,
3175 Option<Datetime>,
3176 Option<i64>,
3177 ),
3178 _type: PhantomData<fn() -> S>,
3179}
3180
3181impl Settings<DefaultStr> {
3182 pub fn new() -> SettingsBuilder<settings_state::Empty, DefaultStr> {
3184 SettingsBuilder::new()
3185 }
3186}
3187
3188impl<S: BosStr> Settings<S> {
3189 pub fn builder() -> SettingsBuilder<settings_state::Empty, S> {
3191 SettingsBuilder::builder()
3192 }
3193}
3194
3195impl SettingsBuilder<settings_state::Empty, DefaultStr> {
3196 pub fn new() -> Self {
3198 SettingsBuilder {
3199 _state: PhantomData,
3200 _fields: (None, None, None, None, None, None, None, None),
3201 _type: PhantomData,
3202 }
3203 }
3204}
3205
3206impl<S: BosStr> SettingsBuilder<settings_state::Empty, S> {
3207 pub fn builder() -> Self {
3209 SettingsBuilder {
3210 _state: PhantomData,
3211 _fields: (None, None, None, None, None, None, None, None),
3212 _type: PhantomData,
3213 }
3214 }
3215}
3216
3217impl<St: settings_state::State, S: BosStr> SettingsBuilder<St, S> {
3218 pub fn behavior_settings(
3220 mut self,
3221 value: impl Into<Option<settings::BehaviorSettings<S>>>,
3222 ) -> Self {
3223 self._fields.0 = value.into();
3224 self
3225 }
3226 pub fn maybe_behavior_settings(
3228 mut self,
3229 value: Option<settings::BehaviorSettings<S>>,
3230 ) -> Self {
3231 self._fields.0 = value;
3232 self
3233 }
3234}
3235
3236impl<St: settings_state::State, S: BosStr> SettingsBuilder<St, S> {
3237 pub fn control_order(mut self, value: impl Into<Option<Vec<S>>>) -> Self {
3239 self._fields.1 = value.into();
3240 self
3241 }
3242 pub fn maybe_control_order(mut self, value: Option<Vec<S>>) -> Self {
3244 self._fields.1 = value;
3245 self
3246 }
3247}
3248
3249impl<St: settings_state::State, S: BosStr> SettingsBuilder<St, S> {
3250 pub fn control_settings(
3252 mut self,
3253 value: impl Into<Option<settings::ControlSettings<S>>>,
3254 ) -> Self {
3255 self._fields.2 = value.into();
3256 self
3257 }
3258 pub fn maybe_control_settings(
3260 mut self,
3261 value: Option<settings::ControlSettings<S>>,
3262 ) -> Self {
3263 self._fields.2 = value;
3264 self
3265 }
3266}
3267
3268impl<St, S: BosStr> SettingsBuilder<St, S>
3269where
3270 St: settings_state::State,
3271 St::CreatedAt: settings_state::IsUnset,
3272{
3273 pub fn created_at(
3275 mut self,
3276 value: impl Into<Datetime>,
3277 ) -> SettingsBuilder<settings_state::SetCreatedAt<St>, S> {
3278 self._fields.3 = Option::Some(value.into());
3279 SettingsBuilder {
3280 _state: PhantomData,
3281 _fields: self._fields,
3282 _type: PhantomData,
3283 }
3284 }
3285}
3286
3287impl<St: settings_state::State, S: BosStr> SettingsBuilder<St, S> {
3288 pub fn theme(mut self, value: impl Into<Option<S>>) -> Self {
3290 self._fields.4 = value.into();
3291 self
3292 }
3293 pub fn maybe_theme(mut self, value: Option<S>) -> Self {
3295 self._fields.4 = value;
3296 self
3297 }
3298}
3299
3300impl<St: settings_state::State, S: BosStr> SettingsBuilder<St, S> {
3301 pub fn ui_settings(
3303 mut self,
3304 value: impl Into<Option<settings::UiSettings<S>>>,
3305 ) -> Self {
3306 self._fields.5 = value.into();
3307 self
3308 }
3309 pub fn maybe_ui_settings(mut self, value: Option<settings::UiSettings<S>>) -> Self {
3311 self._fields.5 = value;
3312 self
3313 }
3314}
3315
3316impl<St, S: BosStr> SettingsBuilder<St, S>
3317where
3318 St: settings_state::State,
3319 St::UpdatedAt: settings_state::IsUnset,
3320{
3321 pub fn updated_at(
3323 mut self,
3324 value: impl Into<Datetime>,
3325 ) -> SettingsBuilder<settings_state::SetUpdatedAt<St>, S> {
3326 self._fields.6 = Option::Some(value.into());
3327 SettingsBuilder {
3328 _state: PhantomData,
3329 _fields: self._fields,
3330 _type: PhantomData,
3331 }
3332 }
3333}
3334
3335impl<St, S: BosStr> SettingsBuilder<St, S>
3336where
3337 St: settings_state::State,
3338 St::Version: settings_state::IsUnset,
3339{
3340 pub fn version(
3342 mut self,
3343 value: impl Into<i64>,
3344 ) -> SettingsBuilder<settings_state::SetVersion<St>, S> {
3345 self._fields.7 = Option::Some(value.into());
3346 SettingsBuilder {
3347 _state: PhantomData,
3348 _fields: self._fields,
3349 _type: PhantomData,
3350 }
3351 }
3352}
3353
3354impl<St, S: BosStr> SettingsBuilder<St, S>
3355where
3356 St: settings_state::State,
3357 St::CreatedAt: settings_state::IsSet,
3358 St::UpdatedAt: settings_state::IsSet,
3359 St::Version: settings_state::IsSet,
3360{
3361 pub fn build(self) -> Settings<S> {
3363 Settings {
3364 behavior_settings: self._fields.0,
3365 control_order: self._fields.1,
3366 control_settings: self._fields.2,
3367 created_at: self._fields.3.unwrap(),
3368 theme: self._fields.4,
3369 ui_settings: self._fields.5,
3370 updated_at: self._fields.6.unwrap(),
3371 version: self._fields.7.unwrap(),
3372 extra_data: Default::default(),
3373 }
3374 }
3375 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> Settings<S> {
3377 Settings {
3378 behavior_settings: self._fields.0,
3379 control_order: self._fields.1,
3380 control_settings: self._fields.2,
3381 created_at: self._fields.3.unwrap(),
3382 theme: self._fields.4,
3383 ui_settings: self._fields.5,
3384 updated_at: self._fields.6.unwrap(),
3385 version: self._fields.7.unwrap(),
3386 extra_data: Some(extra_data),
3387 }
3388 }
3389}