Client side atproto account migrator in your web browser, along with services for backups and adversarial migrations. pdsmoover.com
pds atproto migrations moo cow

listblobs endpoint, cid bugs fix, updates #7

merged opened by baileytownsend.dev targeting main from feature/listBlobs
Labels

None yet.

Participants 1
AT URI
at://did:plc:rnpkyqnmsw4ipey6eotbdnnf/sh.tangled.repo.pull/3meyh44bvqc22
+5626 -218
Diff #1
+9 -18
Cargo.lock
··· 648 648 649 649 [[package]] 650 650 name = "bytes" 651 - version = "1.10.1" 651 + version = "1.11.0" 652 652 source = "registry+https://github.com/rust-lang/crates.io-index" 653 - checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 653 + checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" 654 654 dependencies = [ 655 655 "serde", 656 656 ] ··· 2425 2425 "http", 2426 2426 "jacquard-api", 2427 2427 "jacquard-common", 2428 - "jacquard-derive 0.9.5", 2428 + "jacquard-derive", 2429 2429 "jacquard-identity", 2430 2430 "jacquard-oauth", 2431 2431 "jose-jwk", ··· 2453 2453 "bon", 2454 2454 "bytes", 2455 2455 "jacquard-common", 2456 - "jacquard-derive 0.9.5", 2456 + "jacquard-derive", 2457 2457 "jacquard-lexicon", 2458 2458 "miette", 2459 2459 "rustversion", ··· 2474 2474 "bytes", 2475 2475 "jacquard", 2476 2476 "jacquard-common", 2477 - "jacquard-derive 0.9.5", 2477 + "jacquard-derive", 2478 2478 "jacquard-identity", 2479 2479 "miette", 2480 2480 "multibase", ··· 2530 2530 2531 2531 [[package]] 2532 2532 name = "jacquard-derive" 2533 - version = "0.6.0" 2534 - source = "registry+https://github.com/rust-lang/crates.io-index" 2535 - checksum = "a4741844c0638498156338e6230a81ecb54d0a061ffc6f4f54e97b94972a01fb" 2536 - dependencies = [ 2537 - "proc-macro2", 2538 - "quote", 2539 - "syn 2.0.106", 2540 - ] 2541 - 2542 - [[package]] 2543 - name = "jacquard-derive" 2544 2533 version = "0.9.5" 2545 2534 source = "registry+https://github.com/rust-lang/crates.io-index" 2546 2535 checksum = "9c8d73dfee07943fdab93569ed1c28b06c6921ed891c08b415c4a323ff67e593" ··· 2801 2790 version = "0.1.0" 2802 2791 dependencies = [ 2803 2792 "bon", 2793 + "bytes", 2804 2794 "jacquard-common", 2805 - "jacquard-derive 0.6.0", 2795 + "jacquard-derive", 2796 + "jacquard-lexicon", 2806 2797 "miette", 2807 2798 "serde", 2808 2799 "thiserror 2.0.17", 2800 + "unicode-segmentation", 2809 2801 ] 2810 2802 2811 2803 [[package]] ··· 4673 4665 "anyhow", 4674 4666 "apalis", 4675 4667 "apalis-cron", 4676 - "apalis-sql", 4677 4668 "async-compression", 4678 4669 "chrono", 4679 4670 "futures",
+7 -4
justfile
··· 3 3 docker buildx build \ 4 4 --platform linux/arm64,linux/amd64 \ 5 5 --tag fatfingers23/moover_web:latest \ 6 - --tag fatfingers23/moover_web:0.0.2 \ 6 + --tag fatfingers23/moover_web:0.0.3 \ 7 7 --file Dockerfiles/web.Dockerfile \ 8 + --builder desktop-linux \ 8 9 --push . 9 10 # Worker 10 11 docker buildx build \ 11 12 --platform linux/arm64,linux/amd64 \ 12 13 --tag fatfingers23/moover_worker:latest \ 13 - --tag fatfingers23/moover_worker:0.0.3 \ 14 + --tag fatfingers23/moover_worker:0.0.4 \ 14 15 --file Dockerfiles/worker.Dockerfile \ 16 + --builder desktop-linux \ 15 17 --push . 16 18 #cron worker 17 19 docker buildx build \ 18 20 --platform linux/arm64,linux/amd64 \ 19 21 --tag fatfingers23/moover_cron_worker:latest \ 20 - --tag fatfingers23/moover_cron_worker:0.0.2 \ 22 + --tag fatfingers23/moover_cron_worker:0.0.3 \ 21 23 --file Dockerfiles/cron-worker.Dockerfile \ 22 24 --push . 23 25 ··· 25 27 docker buildx build \ 26 28 --platform linux/arm64,linux/amd64 \ 27 29 --tag fatfingers23/moover_ui:latest \ 28 - --tag fatfingers23/moover_ui:0.0.4 \ 30 + --tag fatfingers23/moover_ui:0.0.6 \ 29 31 --file Dockerfiles/web-ui.Dockerfile \ 32 + --builder desktop-linux \ 30 33 --push .
+4 -1
lexicon_types_crate/Cargo.toml
··· 5 5 license = "MIT" 6 6 7 7 [dependencies] 8 + bytes = { version = "1.11.0", features = ["serde"] } 8 9 jacquard-common.workspace = true 9 - jacquard-derive = "0.6.0" 10 + jacquard-derive = "0.9.5" 11 + jacquard-lexicon = "0.9.5" 10 12 serde.workspace = true 11 13 thiserror.workspace = true 12 14 miette = "7.6" 13 15 bon = "3.8.0" 16 + unicode-segmentation = "1.12.0" 14 17 15 18 16 19 [features]
+3 -5
lexicon_types_crate/src/app_bsky/actor/get_preferences.rs
··· 12 12 Clone, 13 13 PartialEq, 14 14 Eq, 15 - bon::Builder, 16 15 jacquard_derive::IntoStatic 17 16 )] 18 - #[builder(start_fn = new)] 19 17 #[serde(rename_all = "camelCase")] 20 - pub struct GetPreferences {} 18 + pub struct GetPreferences; 21 19 #[jacquard_derive::lexicon] 22 20 #[derive( 23 21 serde::Serialize, ··· 34 32 pub preferences: crate::app_bsky::actor::Preferences<'a>, 35 33 } 36 34 37 - ///Response type for 35 + /// Response type for 38 36 ///app.bsky.actor.getPreferences 39 37 pub struct GetPreferencesResponse; 40 38 impl jacquard_common::xrpc::XrpcResp for GetPreferencesResponse { ··· 50 48 type Response = GetPreferencesResponse; 51 49 } 52 50 53 - ///Endpoint type for 51 + /// Endpoint type for 54 52 ///app.bsky.actor.getPreferences 55 53 pub struct GetPreferencesRequest; 56 54 impl jacquard_common::xrpc::XrpcEndpoint for GetPreferencesRequest {
+3448 -42
lexicon_types_crate/src/app_bsky/actor.rs
··· 15 15 Clone, 16 16 PartialEq, 17 17 Eq, 18 - jacquard_derive::IntoStatic, 19 - bon::Builder 18 + jacquard_derive::IntoStatic 20 19 )] 21 20 #[serde(rename_all = "camelCase")] 22 21 pub struct AdultContentPref<'a> { 23 22 pub enabled: bool, 24 23 } 25 24 25 + pub mod adult_content_pref_state { 26 + 27 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 28 + #[allow(unused)] 29 + use ::core::marker::PhantomData; 30 + mod sealed { 31 + pub trait Sealed {} 32 + } 33 + /// State trait tracking which required fields have been set 34 + pub trait State: sealed::Sealed { 35 + type Enabled; 36 + } 37 + /// Empty state - all required fields are unset 38 + pub struct Empty(()); 39 + impl sealed::Sealed for Empty {} 40 + impl State for Empty { 41 + type Enabled = Unset; 42 + } 43 + ///State transition - sets the `enabled` field to Set 44 + pub struct SetEnabled<S: State = Empty>(PhantomData<fn() -> S>); 45 + impl<S: State> sealed::Sealed for SetEnabled<S> {} 46 + impl<S: State> State for SetEnabled<S> { 47 + type Enabled = Set<members::enabled>; 48 + } 49 + /// Marker types for field names 50 + #[allow(non_camel_case_types)] 51 + pub mod members { 52 + ///Marker type for the `enabled` field 53 + pub struct enabled(()); 54 + } 55 + } 56 + 57 + /// Builder for constructing an instance of this type 58 + pub struct AdultContentPrefBuilder<'a, S: adult_content_pref_state::State> { 59 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 60 + __unsafe_private_named: (::core::option::Option<bool>,), 61 + _phantom: ::core::marker::PhantomData<&'a ()>, 62 + } 63 + 64 + impl<'a> AdultContentPref<'a> { 65 + /// Create a new builder for this type 66 + pub fn new() -> AdultContentPrefBuilder<'a, adult_content_pref_state::Empty> { 67 + AdultContentPrefBuilder::new() 68 + } 69 + } 70 + 71 + impl<'a> AdultContentPrefBuilder<'a, adult_content_pref_state::Empty> { 72 + /// Create a new builder with all fields unset 73 + pub fn new() -> Self { 74 + AdultContentPrefBuilder { 75 + _phantom_state: ::core::marker::PhantomData, 76 + __unsafe_private_named: (None,), 77 + _phantom: ::core::marker::PhantomData, 78 + } 79 + } 80 + } 81 + 82 + impl<'a, S> AdultContentPrefBuilder<'a, S> 83 + where 84 + S: adult_content_pref_state::State, 85 + S::Enabled: adult_content_pref_state::IsUnset, 86 + { 87 + /// Set the `enabled` field (required) 88 + pub fn enabled( 89 + mut self, 90 + value: impl Into<bool>, 91 + ) -> AdultContentPrefBuilder<'a, adult_content_pref_state::SetEnabled<S>> { 92 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 93 + AdultContentPrefBuilder { 94 + _phantom_state: ::core::marker::PhantomData, 95 + __unsafe_private_named: self.__unsafe_private_named, 96 + _phantom: ::core::marker::PhantomData, 97 + } 98 + } 99 + } 100 + 101 + impl<'a, S> AdultContentPrefBuilder<'a, S> 102 + where 103 + S: adult_content_pref_state::State, 104 + S::Enabled: adult_content_pref_state::IsSet, 105 + { 106 + /// Build the final struct 107 + pub fn build(self) -> AdultContentPref<'a> { 108 + AdultContentPref { 109 + enabled: self.__unsafe_private_named.0.unwrap(), 110 + extra_data: Default::default(), 111 + } 112 + } 113 + /// Build the final struct with custom extra_data 114 + pub fn build_with_data( 115 + self, 116 + extra_data: std::collections::BTreeMap< 117 + jacquard_common::smol_str::SmolStr, 118 + jacquard_common::types::value::Data<'a>, 119 + >, 120 + ) -> AdultContentPref<'a> { 121 + AdultContentPref { 122 + enabled: self.__unsafe_private_named.0.unwrap(), 123 + extra_data: Some(extra_data), 124 + } 125 + } 126 + } 127 + 128 + fn lexicon_doc_app_bsky_actor_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc< 129 + 'static, 130 + > { 131 + ::jacquard_lexicon::lexicon::LexiconDoc { 132 + lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, 133 + id: ::jacquard_common::CowStr::new_static("app.bsky.actor.defs"), 134 + revision: None, 135 + description: None, 136 + defs: { 137 + let mut map = ::alloc::collections::BTreeMap::new(); 138 + map.insert( 139 + ::jacquard_common::smol_str::SmolStr::new_static("adultContentPref"), 140 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 141 + description: None, 142 + required: Some( 143 + vec![::jacquard_common::smol_str::SmolStr::new_static("enabled")], 144 + ), 145 + nullable: None, 146 + properties: { 147 + #[allow(unused_mut)] 148 + let mut map = ::alloc::collections::BTreeMap::new(); 149 + map.insert( 150 + ::jacquard_common::smol_str::SmolStr::new_static("enabled"), 151 + ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 152 + description: None, 153 + default: None, 154 + r#const: None, 155 + }), 156 + ); 157 + map 158 + }, 159 + }), 160 + ); 161 + map.insert( 162 + ::jacquard_common::smol_str::SmolStr::new_static("bskyAppProgressGuide"), 163 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 164 + description: Some( 165 + ::jacquard_common::CowStr::new_static( 166 + "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.", 167 + ), 168 + ), 169 + required: Some( 170 + vec![::jacquard_common::smol_str::SmolStr::new_static("guide")], 171 + ), 172 + nullable: None, 173 + properties: { 174 + #[allow(unused_mut)] 175 + let mut map = ::alloc::collections::BTreeMap::new(); 176 + map.insert( 177 + ::jacquard_common::smol_str::SmolStr::new_static("guide"), 178 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 179 + description: None, 180 + format: None, 181 + default: None, 182 + min_length: None, 183 + max_length: Some(100usize), 184 + min_graphemes: None, 185 + max_graphemes: None, 186 + r#enum: None, 187 + r#const: None, 188 + known_values: None, 189 + }), 190 + ); 191 + map 192 + }, 193 + }), 194 + ); 195 + map.insert( 196 + ::jacquard_common::smol_str::SmolStr::new_static("bskyAppStatePref"), 197 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 198 + description: Some( 199 + ::jacquard_common::CowStr::new_static( 200 + "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.", 201 + ), 202 + ), 203 + required: None, 204 + nullable: None, 205 + properties: { 206 + #[allow(unused_mut)] 207 + let mut map = ::alloc::collections::BTreeMap::new(); 208 + map.insert( 209 + ::jacquard_common::smol_str::SmolStr::new_static( 210 + "activeProgressGuide", 211 + ), 212 + ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { 213 + description: None, 214 + r#ref: ::jacquard_common::CowStr::new_static( 215 + "#bskyAppProgressGuide", 216 + ), 217 + }), 218 + ); 219 + map.insert( 220 + ::jacquard_common::smol_str::SmolStr::new_static("nuxs"), 221 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 222 + description: Some( 223 + ::jacquard_common::CowStr::new_static( 224 + "Storage for NUXs the user has encountered.", 225 + ), 226 + ), 227 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { 228 + description: None, 229 + r#ref: ::jacquard_common::CowStr::new_static( 230 + "app.bsky.actor.defs#nux", 231 + ), 232 + }), 233 + min_length: None, 234 + max_length: Some(100usize), 235 + }), 236 + ); 237 + map.insert( 238 + ::jacquard_common::smol_str::SmolStr::new_static( 239 + "queuedNudges", 240 + ), 241 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 242 + description: Some( 243 + ::jacquard_common::CowStr::new_static( 244 + "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.", 245 + ), 246 + ), 247 + items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { 248 + description: None, 249 + format: None, 250 + default: None, 251 + min_length: None, 252 + max_length: Some(100usize), 253 + min_graphemes: None, 254 + max_graphemes: None, 255 + r#enum: None, 256 + r#const: None, 257 + known_values: None, 258 + }), 259 + min_length: None, 260 + max_length: Some(1000usize), 261 + }), 262 + ); 263 + map 264 + }, 265 + }), 266 + ); 267 + map.insert( 268 + ::jacquard_common::smol_str::SmolStr::new_static("contentLabelPref"), 269 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 270 + description: None, 271 + required: Some( 272 + vec![ 273 + ::jacquard_common::smol_str::SmolStr::new_static("label"), 274 + ::jacquard_common::smol_str::SmolStr::new_static("visibility") 275 + ], 276 + ), 277 + nullable: None, 278 + properties: { 279 + #[allow(unused_mut)] 280 + let mut map = ::alloc::collections::BTreeMap::new(); 281 + map.insert( 282 + ::jacquard_common::smol_str::SmolStr::new_static("label"), 283 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 284 + description: None, 285 + format: None, 286 + default: None, 287 + min_length: None, 288 + max_length: None, 289 + min_graphemes: None, 290 + max_graphemes: None, 291 + r#enum: None, 292 + r#const: None, 293 + known_values: None, 294 + }), 295 + ); 296 + map.insert( 297 + ::jacquard_common::smol_str::SmolStr::new_static( 298 + "labelerDid", 299 + ), 300 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 301 + description: Some( 302 + ::jacquard_common::CowStr::new_static( 303 + "Which labeler does this preference apply to? If undefined, applies globally.", 304 + ), 305 + ), 306 + format: Some( 307 + ::jacquard_lexicon::lexicon::LexStringFormat::Did, 308 + ), 309 + default: None, 310 + min_length: None, 311 + max_length: None, 312 + min_graphemes: None, 313 + max_graphemes: None, 314 + r#enum: None, 315 + r#const: None, 316 + known_values: None, 317 + }), 318 + ); 319 + map.insert( 320 + ::jacquard_common::smol_str::SmolStr::new_static( 321 + "visibility", 322 + ), 323 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 324 + description: None, 325 + format: None, 326 + default: None, 327 + min_length: None, 328 + max_length: None, 329 + min_graphemes: None, 330 + max_graphemes: None, 331 + r#enum: None, 332 + r#const: None, 333 + known_values: None, 334 + }), 335 + ); 336 + map 337 + }, 338 + }), 339 + ); 340 + map.insert( 341 + ::jacquard_common::smol_str::SmolStr::new_static("feedViewPref"), 342 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 343 + description: None, 344 + required: Some( 345 + vec![::jacquard_common::smol_str::SmolStr::new_static("feed")], 346 + ), 347 + nullable: None, 348 + properties: { 349 + #[allow(unused_mut)] 350 + let mut map = ::alloc::collections::BTreeMap::new(); 351 + map.insert( 352 + ::jacquard_common::smol_str::SmolStr::new_static("feed"), 353 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 354 + description: Some( 355 + ::jacquard_common::CowStr::new_static( 356 + "The URI of the feed, or an identifier which describes the feed.", 357 + ), 358 + ), 359 + format: None, 360 + default: None, 361 + min_length: None, 362 + max_length: None, 363 + min_graphemes: None, 364 + max_graphemes: None, 365 + r#enum: None, 366 + r#const: None, 367 + known_values: None, 368 + }), 369 + ); 370 + map.insert( 371 + ::jacquard_common::smol_str::SmolStr::new_static( 372 + "hideQuotePosts", 373 + ), 374 + ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 375 + description: None, 376 + default: None, 377 + r#const: None, 378 + }), 379 + ); 380 + map.insert( 381 + ::jacquard_common::smol_str::SmolStr::new_static( 382 + "hideReplies", 383 + ), 384 + ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 385 + description: None, 386 + default: None, 387 + r#const: None, 388 + }), 389 + ); 390 + map.insert( 391 + ::jacquard_common::smol_str::SmolStr::new_static( 392 + "hideRepliesByLikeCount", 393 + ), 394 + ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { 395 + description: None, 396 + default: None, 397 + minimum: None, 398 + maximum: None, 399 + r#enum: None, 400 + r#const: None, 401 + }), 402 + ); 403 + map.insert( 404 + ::jacquard_common::smol_str::SmolStr::new_static( 405 + "hideRepliesByUnfollowed", 406 + ), 407 + ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 408 + description: None, 409 + default: None, 410 + r#const: None, 411 + }), 412 + ); 413 + map.insert( 414 + ::jacquard_common::smol_str::SmolStr::new_static( 415 + "hideReposts", 416 + ), 417 + ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 418 + description: None, 419 + default: None, 420 + r#const: None, 421 + }), 422 + ); 423 + map 424 + }, 425 + }), 426 + ); 427 + map.insert( 428 + ::jacquard_common::smol_str::SmolStr::new_static("hiddenPostsPref"), 429 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 430 + description: None, 431 + required: Some( 432 + vec![::jacquard_common::smol_str::SmolStr::new_static("items")], 433 + ), 434 + nullable: None, 435 + properties: { 436 + #[allow(unused_mut)] 437 + let mut map = ::alloc::collections::BTreeMap::new(); 438 + map.insert( 439 + ::jacquard_common::smol_str::SmolStr::new_static("items"), 440 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 441 + description: Some( 442 + ::jacquard_common::CowStr::new_static( 443 + "A list of URIs of posts the account owner has hidden.", 444 + ), 445 + ), 446 + items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { 447 + description: None, 448 + format: Some( 449 + ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 450 + ), 451 + default: None, 452 + min_length: None, 453 + max_length: None, 454 + min_graphemes: None, 455 + max_graphemes: None, 456 + r#enum: None, 457 + r#const: None, 458 + known_values: None, 459 + }), 460 + min_length: None, 461 + max_length: None, 462 + }), 463 + ); 464 + map 465 + }, 466 + }), 467 + ); 468 + map.insert( 469 + ::jacquard_common::smol_str::SmolStr::new_static("interestsPref"), 470 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 471 + description: None, 472 + required: Some( 473 + vec![::jacquard_common::smol_str::SmolStr::new_static("tags")], 474 + ), 475 + nullable: None, 476 + properties: { 477 + #[allow(unused_mut)] 478 + let mut map = ::alloc::collections::BTreeMap::new(); 479 + map.insert( 480 + ::jacquard_common::smol_str::SmolStr::new_static("tags"), 481 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 482 + description: Some( 483 + ::jacquard_common::CowStr::new_static( 484 + "A list of tags which describe the account owner's interests gathered during onboarding.", 485 + ), 486 + ), 487 + items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { 488 + description: None, 489 + format: None, 490 + default: None, 491 + min_length: None, 492 + max_length: Some(640usize), 493 + min_graphemes: None, 494 + max_graphemes: Some(64usize), 495 + r#enum: None, 496 + r#const: None, 497 + known_values: None, 498 + }), 499 + min_length: None, 500 + max_length: Some(100usize), 501 + }), 502 + ); 503 + map 504 + }, 505 + }), 506 + ); 507 + map.insert( 508 + ::jacquard_common::smol_str::SmolStr::new_static("labelerPrefItem"), 509 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 510 + description: None, 511 + required: Some( 512 + vec![::jacquard_common::smol_str::SmolStr::new_static("did")], 513 + ), 514 + nullable: None, 515 + properties: { 516 + #[allow(unused_mut)] 517 + let mut map = ::alloc::collections::BTreeMap::new(); 518 + map.insert( 519 + ::jacquard_common::smol_str::SmolStr::new_static("did"), 520 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 521 + description: None, 522 + format: Some( 523 + ::jacquard_lexicon::lexicon::LexStringFormat::Did, 524 + ), 525 + default: None, 526 + min_length: None, 527 + max_length: None, 528 + min_graphemes: None, 529 + max_graphemes: None, 530 + r#enum: None, 531 + r#const: None, 532 + known_values: None, 533 + }), 534 + ); 535 + map 536 + }, 537 + }), 538 + ); 539 + map.insert( 540 + ::jacquard_common::smol_str::SmolStr::new_static("labelersPref"), 541 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 542 + description: None, 543 + required: Some( 544 + vec![ 545 + ::jacquard_common::smol_str::SmolStr::new_static("labelers") 546 + ], 547 + ), 548 + nullable: None, 549 + properties: { 550 + #[allow(unused_mut)] 551 + let mut map = ::alloc::collections::BTreeMap::new(); 552 + map.insert( 553 + ::jacquard_common::smol_str::SmolStr::new_static("labelers"), 554 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 555 + description: None, 556 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { 557 + description: None, 558 + r#ref: ::jacquard_common::CowStr::new_static( 559 + "#labelerPrefItem", 560 + ), 561 + }), 562 + min_length: None, 563 + max_length: None, 564 + }), 565 + ); 566 + map 567 + }, 568 + }), 569 + ); 570 + map.insert( 571 + ::jacquard_common::smol_str::SmolStr::new_static("mutedWord"), 572 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 573 + description: Some( 574 + ::jacquard_common::CowStr::new_static( 575 + "A word that the account owner has muted.", 576 + ), 577 + ), 578 + required: Some( 579 + vec![ 580 + ::jacquard_common::smol_str::SmolStr::new_static("value"), 581 + ::jacquard_common::smol_str::SmolStr::new_static("targets") 582 + ], 583 + ), 584 + nullable: None, 585 + properties: { 586 + #[allow(unused_mut)] 587 + let mut map = ::alloc::collections::BTreeMap::new(); 588 + map.insert( 589 + ::jacquard_common::smol_str::SmolStr::new_static( 590 + "actorTarget", 591 + ), 592 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 593 + description: Some( 594 + ::jacquard_common::CowStr::new_static( 595 + "Groups of users to apply the muted word to. If undefined, applies to all users.", 596 + ), 597 + ), 598 + format: None, 599 + default: None, 600 + min_length: None, 601 + max_length: None, 602 + min_graphemes: None, 603 + max_graphemes: None, 604 + r#enum: None, 605 + r#const: None, 606 + known_values: None, 607 + }), 608 + ); 609 + map.insert( 610 + ::jacquard_common::smol_str::SmolStr::new_static( 611 + "expiresAt", 612 + ), 613 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 614 + description: Some( 615 + ::jacquard_common::CowStr::new_static( 616 + "The date and time at which the muted word will expire and no longer be applied.", 617 + ), 618 + ), 619 + format: Some( 620 + ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 621 + ), 622 + default: None, 623 + min_length: None, 624 + max_length: None, 625 + min_graphemes: None, 626 + max_graphemes: None, 627 + r#enum: None, 628 + r#const: None, 629 + known_values: None, 630 + }), 631 + ); 632 + map.insert( 633 + ::jacquard_common::smol_str::SmolStr::new_static("id"), 634 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 635 + description: None, 636 + format: None, 637 + default: None, 638 + min_length: None, 639 + max_length: None, 640 + min_graphemes: None, 641 + max_graphemes: None, 642 + r#enum: None, 643 + r#const: None, 644 + known_values: None, 645 + }), 646 + ); 647 + map.insert( 648 + ::jacquard_common::smol_str::SmolStr::new_static("targets"), 649 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 650 + description: Some( 651 + ::jacquard_common::CowStr::new_static( 652 + "The intended targets of the muted word.", 653 + ), 654 + ), 655 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { 656 + description: None, 657 + r#ref: ::jacquard_common::CowStr::new_static( 658 + "app.bsky.actor.defs#mutedWordTarget", 659 + ), 660 + }), 661 + min_length: None, 662 + max_length: None, 663 + }), 664 + ); 665 + map.insert( 666 + ::jacquard_common::smol_str::SmolStr::new_static("value"), 667 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 668 + description: Some( 669 + ::jacquard_common::CowStr::new_static( 670 + "The muted word itself.", 671 + ), 672 + ), 673 + format: None, 674 + default: None, 675 + min_length: None, 676 + max_length: Some(10000usize), 677 + min_graphemes: None, 678 + max_graphemes: Some(1000usize), 679 + r#enum: None, 680 + r#const: None, 681 + known_values: None, 682 + }), 683 + ); 684 + map 685 + }, 686 + }), 687 + ); 688 + map.insert( 689 + ::jacquard_common::smol_str::SmolStr::new_static("mutedWordTarget"), 690 + ::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString { 691 + description: None, 692 + format: None, 693 + default: None, 694 + min_length: None, 695 + max_length: Some(640usize), 696 + min_graphemes: None, 697 + max_graphemes: Some(64usize), 698 + r#enum: None, 699 + r#const: None, 700 + known_values: None, 701 + }), 702 + ); 703 + map.insert( 704 + ::jacquard_common::smol_str::SmolStr::new_static("mutedWordsPref"), 705 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 706 + description: None, 707 + required: Some( 708 + vec![::jacquard_common::smol_str::SmolStr::new_static("items")], 709 + ), 710 + nullable: None, 711 + properties: { 712 + #[allow(unused_mut)] 713 + let mut map = ::alloc::collections::BTreeMap::new(); 714 + map.insert( 715 + ::jacquard_common::smol_str::SmolStr::new_static("items"), 716 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 717 + description: Some( 718 + ::jacquard_common::CowStr::new_static( 719 + "A list of words the account owner has muted.", 720 + ), 721 + ), 722 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { 723 + description: None, 724 + r#ref: ::jacquard_common::CowStr::new_static( 725 + "app.bsky.actor.defs#mutedWord", 726 + ), 727 + }), 728 + min_length: None, 729 + max_length: None, 730 + }), 731 + ); 732 + map 733 + }, 734 + }), 735 + ); 736 + map.insert( 737 + ::jacquard_common::smol_str::SmolStr::new_static("nux"), 738 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 739 + description: Some( 740 + ::jacquard_common::CowStr::new_static( 741 + "A new user experiences (NUX) storage object", 742 + ), 743 + ), 744 + required: Some( 745 + vec![ 746 + ::jacquard_common::smol_str::SmolStr::new_static("id"), 747 + ::jacquard_common::smol_str::SmolStr::new_static("completed") 748 + ], 749 + ), 750 + nullable: None, 751 + properties: { 752 + #[allow(unused_mut)] 753 + let mut map = ::alloc::collections::BTreeMap::new(); 754 + map.insert( 755 + ::jacquard_common::smol_str::SmolStr::new_static( 756 + "completed", 757 + ), 758 + ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 759 + description: None, 760 + default: None, 761 + r#const: None, 762 + }), 763 + ); 764 + map.insert( 765 + ::jacquard_common::smol_str::SmolStr::new_static("data"), 766 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 767 + description: Some( 768 + ::jacquard_common::CowStr::new_static( 769 + "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.", 770 + ), 771 + ), 772 + format: None, 773 + default: None, 774 + min_length: None, 775 + max_length: Some(3000usize), 776 + min_graphemes: None, 777 + max_graphemes: Some(300usize), 778 + r#enum: None, 779 + r#const: None, 780 + known_values: None, 781 + }), 782 + ); 783 + map.insert( 784 + ::jacquard_common::smol_str::SmolStr::new_static( 785 + "expiresAt", 786 + ), 787 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 788 + description: Some( 789 + ::jacquard_common::CowStr::new_static( 790 + "The date and time at which the NUX will expire and should be considered completed.", 791 + ), 792 + ), 793 + format: Some( 794 + ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 795 + ), 796 + default: None, 797 + min_length: None, 798 + max_length: None, 799 + min_graphemes: None, 800 + max_graphemes: None, 801 + r#enum: None, 802 + r#const: None, 803 + known_values: None, 804 + }), 805 + ); 806 + map.insert( 807 + ::jacquard_common::smol_str::SmolStr::new_static("id"), 808 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 809 + description: None, 810 + format: None, 811 + default: None, 812 + min_length: None, 813 + max_length: Some(100usize), 814 + min_graphemes: None, 815 + max_graphemes: None, 816 + r#enum: None, 817 + r#const: None, 818 + known_values: None, 819 + }), 820 + ); 821 + map 822 + }, 823 + }), 824 + ); 825 + map.insert( 826 + ::jacquard_common::smol_str::SmolStr::new_static("personalDetailsPref"), 827 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 828 + description: None, 829 + required: None, 830 + nullable: None, 831 + properties: { 832 + #[allow(unused_mut)] 833 + let mut map = ::alloc::collections::BTreeMap::new(); 834 + map.insert( 835 + ::jacquard_common::smol_str::SmolStr::new_static( 836 + "birthDate", 837 + ), 838 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 839 + description: Some( 840 + ::jacquard_common::CowStr::new_static( 841 + "The birth date of account owner.", 842 + ), 843 + ), 844 + format: Some( 845 + ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 846 + ), 847 + default: None, 848 + min_length: None, 849 + max_length: None, 850 + min_graphemes: None, 851 + max_graphemes: None, 852 + r#enum: None, 853 + r#const: None, 854 + known_values: None, 855 + }), 856 + ); 857 + map 858 + }, 859 + }), 860 + ); 861 + map.insert( 862 + ::jacquard_common::smol_str::SmolStr::new_static( 863 + "postInteractionSettingsPref", 864 + ), 865 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 866 + description: Some( 867 + ::jacquard_common::CowStr::new_static( 868 + "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.", 869 + ), 870 + ), 871 + required: Some(vec![]), 872 + nullable: None, 873 + properties: { 874 + #[allow(unused_mut)] 875 + let mut map = ::alloc::collections::BTreeMap::new(); 876 + map.insert( 877 + ::jacquard_common::smol_str::SmolStr::new_static( 878 + "postgateEmbeddingRules", 879 + ), 880 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 881 + description: Some( 882 + ::jacquard_common::CowStr::new_static( 883 + "Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", 884 + ), 885 + ), 886 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion { 887 + description: None, 888 + refs: vec![ 889 + ::jacquard_common::CowStr::new_static("app.bsky.feed.postgate#disableRule") 890 + ], 891 + closed: None, 892 + }), 893 + min_length: None, 894 + max_length: Some(5usize), 895 + }), 896 + ); 897 + map.insert( 898 + ::jacquard_common::smol_str::SmolStr::new_static( 899 + "threadgateAllowRules", 900 + ), 901 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 902 + description: Some( 903 + ::jacquard_common::CowStr::new_static( 904 + "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", 905 + ), 906 + ), 907 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion { 908 + description: None, 909 + refs: vec![ 910 + ::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#mentionRule"), 911 + ::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#followerRule"), 912 + ::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#followingRule"), 913 + ::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#listRule") 914 + ], 915 + closed: None, 916 + }), 917 + min_length: None, 918 + max_length: Some(5usize), 919 + }), 920 + ); 921 + map 922 + }, 923 + }), 924 + ); 925 + map.insert( 926 + ::jacquard_common::smol_str::SmolStr::new_static("preferences"), 927 + ::jacquard_lexicon::lexicon::LexUserType::Array(::jacquard_lexicon::lexicon::LexArray { 928 + description: None, 929 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion { 930 + description: None, 931 + refs: vec![ 932 + ::jacquard_common::CowStr::new_static("#adultContentPref"), 933 + ::jacquard_common::CowStr::new_static("#contentLabelPref"), 934 + ::jacquard_common::CowStr::new_static("#savedFeedsPref"), 935 + ::jacquard_common::CowStr::new_static("#savedFeedsPrefV2"), 936 + ::jacquard_common::CowStr::new_static("#personalDetailsPref"), 937 + ::jacquard_common::CowStr::new_static("#feedViewPref"), 938 + ::jacquard_common::CowStr::new_static("#threadViewPref"), 939 + ::jacquard_common::CowStr::new_static("#interestsPref"), 940 + ::jacquard_common::CowStr::new_static("#mutedWordsPref"), 941 + ::jacquard_common::CowStr::new_static("#hiddenPostsPref"), 942 + ::jacquard_common::CowStr::new_static("#bskyAppStatePref"), 943 + ::jacquard_common::CowStr::new_static("#labelersPref"), 944 + ::jacquard_common::CowStr::new_static("#postInteractionSettingsPref"), 945 + ::jacquard_common::CowStr::new_static("#verificationPrefs") 946 + ], 947 + closed: None, 948 + }), 949 + min_length: None, 950 + max_length: None, 951 + }), 952 + ); 953 + map.insert( 954 + ::jacquard_common::smol_str::SmolStr::new_static("savedFeed"), 955 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 956 + description: None, 957 + required: Some( 958 + vec![ 959 + ::jacquard_common::smol_str::SmolStr::new_static("id"), 960 + ::jacquard_common::smol_str::SmolStr::new_static("type"), 961 + ::jacquard_common::smol_str::SmolStr::new_static("value"), 962 + ::jacquard_common::smol_str::SmolStr::new_static("pinned") 963 + ], 964 + ), 965 + nullable: None, 966 + properties: { 967 + #[allow(unused_mut)] 968 + let mut map = ::alloc::collections::BTreeMap::new(); 969 + map.insert( 970 + ::jacquard_common::smol_str::SmolStr::new_static("id"), 971 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 972 + description: None, 973 + format: None, 974 + default: None, 975 + min_length: None, 976 + max_length: None, 977 + min_graphemes: None, 978 + max_graphemes: None, 979 + r#enum: None, 980 + r#const: None, 981 + known_values: None, 982 + }), 983 + ); 984 + map.insert( 985 + ::jacquard_common::smol_str::SmolStr::new_static("pinned"), 986 + ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 987 + description: None, 988 + default: None, 989 + r#const: None, 990 + }), 991 + ); 992 + map.insert( 993 + ::jacquard_common::smol_str::SmolStr::new_static("type"), 994 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 995 + description: None, 996 + format: None, 997 + default: None, 998 + min_length: None, 999 + max_length: None, 1000 + min_graphemes: None, 1001 + max_graphemes: None, 1002 + r#enum: None, 1003 + r#const: None, 1004 + known_values: None, 1005 + }), 1006 + ); 1007 + map.insert( 1008 + ::jacquard_common::smol_str::SmolStr::new_static("value"), 1009 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 1010 + description: None, 1011 + format: None, 1012 + default: None, 1013 + min_length: None, 1014 + max_length: None, 1015 + min_graphemes: None, 1016 + max_graphemes: None, 1017 + r#enum: None, 1018 + r#const: None, 1019 + known_values: None, 1020 + }), 1021 + ); 1022 + map 1023 + }, 1024 + }), 1025 + ); 1026 + map.insert( 1027 + ::jacquard_common::smol_str::SmolStr::new_static("savedFeedsPref"), 1028 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 1029 + description: None, 1030 + required: Some( 1031 + vec![ 1032 + ::jacquard_common::smol_str::SmolStr::new_static("pinned"), 1033 + ::jacquard_common::smol_str::SmolStr::new_static("saved") 1034 + ], 1035 + ), 1036 + nullable: None, 1037 + properties: { 1038 + #[allow(unused_mut)] 1039 + let mut map = ::alloc::collections::BTreeMap::new(); 1040 + map.insert( 1041 + ::jacquard_common::smol_str::SmolStr::new_static("pinned"), 1042 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 1043 + description: None, 1044 + items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { 1045 + description: None, 1046 + format: Some( 1047 + ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 1048 + ), 1049 + default: None, 1050 + min_length: None, 1051 + max_length: None, 1052 + min_graphemes: None, 1053 + max_graphemes: None, 1054 + r#enum: None, 1055 + r#const: None, 1056 + known_values: None, 1057 + }), 1058 + min_length: None, 1059 + max_length: None, 1060 + }), 1061 + ); 1062 + map.insert( 1063 + ::jacquard_common::smol_str::SmolStr::new_static("saved"), 1064 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 1065 + description: None, 1066 + items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { 1067 + description: None, 1068 + format: Some( 1069 + ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 1070 + ), 1071 + default: None, 1072 + min_length: None, 1073 + max_length: None, 1074 + min_graphemes: None, 1075 + max_graphemes: None, 1076 + r#enum: None, 1077 + r#const: None, 1078 + known_values: None, 1079 + }), 1080 + min_length: None, 1081 + max_length: None, 1082 + }), 1083 + ); 1084 + map.insert( 1085 + ::jacquard_common::smol_str::SmolStr::new_static( 1086 + "timelineIndex", 1087 + ), 1088 + ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { 1089 + description: None, 1090 + default: None, 1091 + minimum: None, 1092 + maximum: None, 1093 + r#enum: None, 1094 + r#const: None, 1095 + }), 1096 + ); 1097 + map 1098 + }, 1099 + }), 1100 + ); 1101 + map.insert( 1102 + ::jacquard_common::smol_str::SmolStr::new_static("savedFeedsPrefV2"), 1103 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 1104 + description: None, 1105 + required: Some( 1106 + vec![::jacquard_common::smol_str::SmolStr::new_static("items")], 1107 + ), 1108 + nullable: None, 1109 + properties: { 1110 + #[allow(unused_mut)] 1111 + let mut map = ::alloc::collections::BTreeMap::new(); 1112 + map.insert( 1113 + ::jacquard_common::smol_str::SmolStr::new_static("items"), 1114 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 1115 + description: None, 1116 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { 1117 + description: None, 1118 + r#ref: ::jacquard_common::CowStr::new_static( 1119 + "app.bsky.actor.defs#savedFeed", 1120 + ), 1121 + }), 1122 + min_length: None, 1123 + max_length: None, 1124 + }), 1125 + ); 1126 + map 1127 + }, 1128 + }), 1129 + ); 1130 + map.insert( 1131 + ::jacquard_common::smol_str::SmolStr::new_static("threadViewPref"), 1132 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 1133 + description: None, 1134 + required: None, 1135 + nullable: None, 1136 + properties: { 1137 + #[allow(unused_mut)] 1138 + let mut map = ::alloc::collections::BTreeMap::new(); 1139 + map.insert( 1140 + ::jacquard_common::smol_str::SmolStr::new_static( 1141 + "prioritizeFollowedUsers", 1142 + ), 1143 + ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 1144 + description: None, 1145 + default: None, 1146 + r#const: None, 1147 + }), 1148 + ); 1149 + map.insert( 1150 + ::jacquard_common::smol_str::SmolStr::new_static("sort"), 1151 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 1152 + description: Some( 1153 + ::jacquard_common::CowStr::new_static( 1154 + "Sorting mode for threads.", 1155 + ), 1156 + ), 1157 + format: None, 1158 + default: None, 1159 + min_length: None, 1160 + max_length: None, 1161 + min_graphemes: None, 1162 + max_graphemes: None, 1163 + r#enum: None, 1164 + r#const: None, 1165 + known_values: None, 1166 + }), 1167 + ); 1168 + map 1169 + }, 1170 + }), 1171 + ); 1172 + map.insert( 1173 + ::jacquard_common::smol_str::SmolStr::new_static("verificationPrefs"), 1174 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 1175 + description: Some( 1176 + ::jacquard_common::CowStr::new_static( 1177 + "Preferences for how verified accounts appear in the app.", 1178 + ), 1179 + ), 1180 + required: Some(vec![]), 1181 + nullable: None, 1182 + properties: { 1183 + #[allow(unused_mut)] 1184 + let mut map = ::alloc::collections::BTreeMap::new(); 1185 + map.insert( 1186 + ::jacquard_common::smol_str::SmolStr::new_static( 1187 + "hideBadges", 1188 + ), 1189 + ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 1190 + description: None, 1191 + default: None, 1192 + r#const: None, 1193 + }), 1194 + ); 1195 + map 1196 + }, 1197 + }), 1198 + ); 1199 + map 1200 + }, 1201 + } 1202 + } 1203 + 1204 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for AdultContentPref<'a> { 1205 + fn nsid() -> &'static str { 1206 + "app.bsky.actor.defs" 1207 + } 1208 + fn def_name() -> &'static str { 1209 + "adultContentPref" 1210 + } 1211 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1212 + lexicon_doc_app_bsky_actor_defs() 1213 + } 1214 + fn validate( 1215 + &self, 1216 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1217 + Ok(()) 1218 + } 1219 + } 1220 + 26 1221 /// If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. 27 1222 #[jacquard_derive::lexicon] 28 1223 #[derive( ··· 41 1236 pub guide: jacquard_common::CowStr<'a>, 42 1237 } 43 1238 1239 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for BskyAppProgressGuide<'a> { 1240 + fn nsid() -> &'static str { 1241 + "app.bsky.actor.defs" 1242 + } 1243 + fn def_name() -> &'static str { 1244 + "bskyAppProgressGuide" 1245 + } 1246 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1247 + lexicon_doc_app_bsky_actor_defs() 1248 + } 1249 + fn validate( 1250 + &self, 1251 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1252 + { 1253 + let value = &self.guide; 1254 + #[allow(unused_comparisons)] 1255 + if <str>::len(value.as_ref()) > 100usize { 1256 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 1257 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 1258 + "guide", 1259 + ), 1260 + max: 100usize, 1261 + actual: <str>::len(value.as_ref()), 1262 + }); 1263 + } 1264 + } 1265 + Ok(()) 1266 + } 1267 + } 1268 + 44 1269 /// A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. 45 1270 #[jacquard_derive::lexicon] 46 1271 #[derive( ··· 70 1295 pub queued_nudges: std::option::Option<Vec<jacquard_common::CowStr<'a>>>, 71 1296 } 72 1297 1298 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for BskyAppStatePref<'a> { 1299 + fn nsid() -> &'static str { 1300 + "app.bsky.actor.defs" 1301 + } 1302 + fn def_name() -> &'static str { 1303 + "bskyAppStatePref" 1304 + } 1305 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1306 + lexicon_doc_app_bsky_actor_defs() 1307 + } 1308 + fn validate( 1309 + &self, 1310 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1311 + if let Some(ref value) = self.nuxs { 1312 + #[allow(unused_comparisons)] 1313 + if value.len() > 100usize { 1314 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 1315 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 1316 + "nuxs", 1317 + ), 1318 + max: 100usize, 1319 + actual: value.len(), 1320 + }); 1321 + } 1322 + } 1323 + if let Some(ref value) = self.queued_nudges { 1324 + #[allow(unused_comparisons)] 1325 + if value.len() > 1000usize { 1326 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 1327 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 1328 + "queued_nudges", 1329 + ), 1330 + max: 1000usize, 1331 + actual: value.len(), 1332 + }); 1333 + } 1334 + } 1335 + Ok(()) 1336 + } 1337 + } 1338 + 73 1339 #[jacquard_derive::lexicon] 74 1340 #[derive( 75 1341 serde::Serialize, ··· 90 1356 #[serde(borrow)] 91 1357 pub labeler_did: std::option::Option<jacquard_common::types::string::Did<'a>>, 92 1358 #[serde(borrow)] 93 - pub visibility: jacquard_common::CowStr<'a>, 1359 + pub visibility: ContentLabelPrefVisibility<'a>, 1360 + } 1361 + 1362 + #[derive(Debug, Clone, PartialEq, Eq, Hash)] 1363 + pub enum ContentLabelPrefVisibility<'a> { 1364 + Ignore, 1365 + Show, 1366 + Warn, 1367 + Hide, 1368 + Other(jacquard_common::CowStr<'a>), 1369 + } 1370 + 1371 + impl<'a> ContentLabelPrefVisibility<'a> { 1372 + pub fn as_str(&self) -> &str { 1373 + match self { 1374 + Self::Ignore => "ignore", 1375 + Self::Show => "show", 1376 + Self::Warn => "warn", 1377 + Self::Hide => "hide", 1378 + Self::Other(s) => s.as_ref(), 1379 + } 1380 + } 1381 + } 1382 + 1383 + impl<'a> From<&'a str> for ContentLabelPrefVisibility<'a> { 1384 + fn from(s: &'a str) -> Self { 1385 + match s { 1386 + "ignore" => Self::Ignore, 1387 + "show" => Self::Show, 1388 + "warn" => Self::Warn, 1389 + "hide" => Self::Hide, 1390 + _ => Self::Other(jacquard_common::CowStr::from(s)), 1391 + } 1392 + } 1393 + } 1394 + 1395 + impl<'a> From<String> for ContentLabelPrefVisibility<'a> { 1396 + fn from(s: String) -> Self { 1397 + match s.as_str() { 1398 + "ignore" => Self::Ignore, 1399 + "show" => Self::Show, 1400 + "warn" => Self::Warn, 1401 + "hide" => Self::Hide, 1402 + _ => Self::Other(jacquard_common::CowStr::from(s)), 1403 + } 1404 + } 1405 + } 1406 + 1407 + impl<'a> core::fmt::Display for ContentLabelPrefVisibility<'a> { 1408 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 1409 + write!(f, "{}", self.as_str()) 1410 + } 1411 + } 1412 + 1413 + impl<'a> AsRef<str> for ContentLabelPrefVisibility<'a> { 1414 + fn as_ref(&self) -> &str { 1415 + self.as_str() 1416 + } 1417 + } 1418 + 1419 + impl<'a> serde::Serialize for ContentLabelPrefVisibility<'a> { 1420 + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> 1421 + where 1422 + S: serde::Serializer, 1423 + { 1424 + serializer.serialize_str(self.as_str()) 1425 + } 1426 + } 1427 + 1428 + impl<'de, 'a> serde::Deserialize<'de> for ContentLabelPrefVisibility<'a> 1429 + where 1430 + 'de: 'a, 1431 + { 1432 + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> 1433 + where 1434 + D: serde::Deserializer<'de>, 1435 + { 1436 + let s = <&'de str>::deserialize(deserializer)?; 1437 + Ok(Self::from(s)) 1438 + } 1439 + } 1440 + 1441 + impl<'a> Default for ContentLabelPrefVisibility<'a> { 1442 + fn default() -> Self { 1443 + Self::Other(Default::default()) 1444 + } 1445 + } 1446 + 1447 + impl jacquard_common::IntoStatic for ContentLabelPrefVisibility<'_> { 1448 + type Output = ContentLabelPrefVisibility<'static>; 1449 + fn into_static(self) -> Self::Output { 1450 + match self { 1451 + ContentLabelPrefVisibility::Ignore => ContentLabelPrefVisibility::Ignore, 1452 + ContentLabelPrefVisibility::Show => ContentLabelPrefVisibility::Show, 1453 + ContentLabelPrefVisibility::Warn => ContentLabelPrefVisibility::Warn, 1454 + ContentLabelPrefVisibility::Hide => ContentLabelPrefVisibility::Hide, 1455 + ContentLabelPrefVisibility::Other(v) => { 1456 + ContentLabelPrefVisibility::Other(v.into_static()) 1457 + } 1458 + } 1459 + } 1460 + } 1461 + 1462 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ContentLabelPref<'a> { 1463 + fn nsid() -> &'static str { 1464 + "app.bsky.actor.defs" 1465 + } 1466 + fn def_name() -> &'static str { 1467 + "contentLabelPref" 1468 + } 1469 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1470 + lexicon_doc_app_bsky_actor_defs() 1471 + } 1472 + fn validate( 1473 + &self, 1474 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1475 + Ok(()) 1476 + } 94 1477 } 95 1478 96 1479 #[jacquard_derive::lexicon] ··· 126 1509 pub hide_reposts: std::option::Option<bool>, 127 1510 } 128 1511 1512 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for FeedViewPref<'a> { 1513 + fn nsid() -> &'static str { 1514 + "app.bsky.actor.defs" 1515 + } 1516 + fn def_name() -> &'static str { 1517 + "feedViewPref" 1518 + } 1519 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1520 + lexicon_doc_app_bsky_actor_defs() 1521 + } 1522 + fn validate( 1523 + &self, 1524 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1525 + Ok(()) 1526 + } 1527 + } 1528 + 129 1529 #[jacquard_derive::lexicon] 130 1530 #[derive( 131 1531 serde::Serialize, ··· 134 1534 Clone, 135 1535 PartialEq, 136 1536 Eq, 137 - jacquard_derive::IntoStatic, 138 - bon::Builder 1537 + jacquard_derive::IntoStatic 139 1538 )] 140 1539 #[serde(rename_all = "camelCase")] 141 1540 pub struct HiddenPostsPref<'a> { ··· 144 1543 pub items: Vec<jacquard_common::types::string::AtUri<'a>>, 145 1544 } 146 1545 1546 + pub mod hidden_posts_pref_state { 1547 + 1548 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 1549 + #[allow(unused)] 1550 + use ::core::marker::PhantomData; 1551 + mod sealed { 1552 + pub trait Sealed {} 1553 + } 1554 + /// State trait tracking which required fields have been set 1555 + pub trait State: sealed::Sealed { 1556 + type Items; 1557 + } 1558 + /// Empty state - all required fields are unset 1559 + pub struct Empty(()); 1560 + impl sealed::Sealed for Empty {} 1561 + impl State for Empty { 1562 + type Items = Unset; 1563 + } 1564 + ///State transition - sets the `items` field to Set 1565 + pub struct SetItems<S: State = Empty>(PhantomData<fn() -> S>); 1566 + impl<S: State> sealed::Sealed for SetItems<S> {} 1567 + impl<S: State> State for SetItems<S> { 1568 + type Items = Set<members::items>; 1569 + } 1570 + /// Marker types for field names 1571 + #[allow(non_camel_case_types)] 1572 + pub mod members { 1573 + ///Marker type for the `items` field 1574 + pub struct items(()); 1575 + } 1576 + } 1577 + 1578 + /// Builder for constructing an instance of this type 1579 + pub struct HiddenPostsPrefBuilder<'a, S: hidden_posts_pref_state::State> { 1580 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 1581 + __unsafe_private_named: ( 1582 + ::core::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 1583 + ), 1584 + _phantom: ::core::marker::PhantomData<&'a ()>, 1585 + } 1586 + 1587 + impl<'a> HiddenPostsPref<'a> { 1588 + /// Create a new builder for this type 1589 + pub fn new() -> HiddenPostsPrefBuilder<'a, hidden_posts_pref_state::Empty> { 1590 + HiddenPostsPrefBuilder::new() 1591 + } 1592 + } 1593 + 1594 + impl<'a> HiddenPostsPrefBuilder<'a, hidden_posts_pref_state::Empty> { 1595 + /// Create a new builder with all fields unset 1596 + pub fn new() -> Self { 1597 + HiddenPostsPrefBuilder { 1598 + _phantom_state: ::core::marker::PhantomData, 1599 + __unsafe_private_named: (None,), 1600 + _phantom: ::core::marker::PhantomData, 1601 + } 1602 + } 1603 + } 1604 + 1605 + impl<'a, S> HiddenPostsPrefBuilder<'a, S> 1606 + where 1607 + S: hidden_posts_pref_state::State, 1608 + S::Items: hidden_posts_pref_state::IsUnset, 1609 + { 1610 + /// Set the `items` field (required) 1611 + pub fn items( 1612 + mut self, 1613 + value: impl Into<Vec<jacquard_common::types::string::AtUri<'a>>>, 1614 + ) -> HiddenPostsPrefBuilder<'a, hidden_posts_pref_state::SetItems<S>> { 1615 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 1616 + HiddenPostsPrefBuilder { 1617 + _phantom_state: ::core::marker::PhantomData, 1618 + __unsafe_private_named: self.__unsafe_private_named, 1619 + _phantom: ::core::marker::PhantomData, 1620 + } 1621 + } 1622 + } 1623 + 1624 + impl<'a, S> HiddenPostsPrefBuilder<'a, S> 1625 + where 1626 + S: hidden_posts_pref_state::State, 1627 + S::Items: hidden_posts_pref_state::IsSet, 1628 + { 1629 + /// Build the final struct 1630 + pub fn build(self) -> HiddenPostsPref<'a> { 1631 + HiddenPostsPref { 1632 + items: self.__unsafe_private_named.0.unwrap(), 1633 + extra_data: Default::default(), 1634 + } 1635 + } 1636 + /// Build the final struct with custom extra_data 1637 + pub fn build_with_data( 1638 + self, 1639 + extra_data: std::collections::BTreeMap< 1640 + jacquard_common::smol_str::SmolStr, 1641 + jacquard_common::types::value::Data<'a>, 1642 + >, 1643 + ) -> HiddenPostsPref<'a> { 1644 + HiddenPostsPref { 1645 + items: self.__unsafe_private_named.0.unwrap(), 1646 + extra_data: Some(extra_data), 1647 + } 1648 + } 1649 + } 1650 + 1651 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for HiddenPostsPref<'a> { 1652 + fn nsid() -> &'static str { 1653 + "app.bsky.actor.defs" 1654 + } 1655 + fn def_name() -> &'static str { 1656 + "hiddenPostsPref" 1657 + } 1658 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1659 + lexicon_doc_app_bsky_actor_defs() 1660 + } 1661 + fn validate( 1662 + &self, 1663 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1664 + Ok(()) 1665 + } 1666 + } 1667 + 147 1668 #[jacquard_derive::lexicon] 148 1669 #[derive( 149 1670 serde::Serialize, ··· 152 1673 Clone, 153 1674 PartialEq, 154 1675 Eq, 155 - jacquard_derive::IntoStatic, 156 - bon::Builder 1676 + jacquard_derive::IntoStatic 157 1677 )] 158 1678 #[serde(rename_all = "camelCase")] 159 1679 pub struct InterestsPref<'a> { ··· 162 1682 pub tags: Vec<jacquard_common::CowStr<'a>>, 163 1683 } 164 1684 1685 + pub mod interests_pref_state { 1686 + 1687 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 1688 + #[allow(unused)] 1689 + use ::core::marker::PhantomData; 1690 + mod sealed { 1691 + pub trait Sealed {} 1692 + } 1693 + /// State trait tracking which required fields have been set 1694 + pub trait State: sealed::Sealed { 1695 + type Tags; 1696 + } 1697 + /// Empty state - all required fields are unset 1698 + pub struct Empty(()); 1699 + impl sealed::Sealed for Empty {} 1700 + impl State for Empty { 1701 + type Tags = Unset; 1702 + } 1703 + ///State transition - sets the `tags` field to Set 1704 + pub struct SetTags<S: State = Empty>(PhantomData<fn() -> S>); 1705 + impl<S: State> sealed::Sealed for SetTags<S> {} 1706 + impl<S: State> State for SetTags<S> { 1707 + type Tags = Set<members::tags>; 1708 + } 1709 + /// Marker types for field names 1710 + #[allow(non_camel_case_types)] 1711 + pub mod members { 1712 + ///Marker type for the `tags` field 1713 + pub struct tags(()); 1714 + } 1715 + } 1716 + 1717 + /// Builder for constructing an instance of this type 1718 + pub struct InterestsPrefBuilder<'a, S: interests_pref_state::State> { 1719 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 1720 + __unsafe_private_named: (::core::option::Option<Vec<jacquard_common::CowStr<'a>>>,), 1721 + _phantom: ::core::marker::PhantomData<&'a ()>, 1722 + } 1723 + 1724 + impl<'a> InterestsPref<'a> { 1725 + /// Create a new builder for this type 1726 + pub fn new() -> InterestsPrefBuilder<'a, interests_pref_state::Empty> { 1727 + InterestsPrefBuilder::new() 1728 + } 1729 + } 1730 + 1731 + impl<'a> InterestsPrefBuilder<'a, interests_pref_state::Empty> { 1732 + /// Create a new builder with all fields unset 1733 + pub fn new() -> Self { 1734 + InterestsPrefBuilder { 1735 + _phantom_state: ::core::marker::PhantomData, 1736 + __unsafe_private_named: (None,), 1737 + _phantom: ::core::marker::PhantomData, 1738 + } 1739 + } 1740 + } 1741 + 1742 + impl<'a, S> InterestsPrefBuilder<'a, S> 1743 + where 1744 + S: interests_pref_state::State, 1745 + S::Tags: interests_pref_state::IsUnset, 1746 + { 1747 + /// Set the `tags` field (required) 1748 + pub fn tags( 1749 + mut self, 1750 + value: impl Into<Vec<jacquard_common::CowStr<'a>>>, 1751 + ) -> InterestsPrefBuilder<'a, interests_pref_state::SetTags<S>> { 1752 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 1753 + InterestsPrefBuilder { 1754 + _phantom_state: ::core::marker::PhantomData, 1755 + __unsafe_private_named: self.__unsafe_private_named, 1756 + _phantom: ::core::marker::PhantomData, 1757 + } 1758 + } 1759 + } 1760 + 1761 + impl<'a, S> InterestsPrefBuilder<'a, S> 1762 + where 1763 + S: interests_pref_state::State, 1764 + S::Tags: interests_pref_state::IsSet, 1765 + { 1766 + /// Build the final struct 1767 + pub fn build(self) -> InterestsPref<'a> { 1768 + InterestsPref { 1769 + tags: self.__unsafe_private_named.0.unwrap(), 1770 + extra_data: Default::default(), 1771 + } 1772 + } 1773 + /// Build the final struct with custom extra_data 1774 + pub fn build_with_data( 1775 + self, 1776 + extra_data: std::collections::BTreeMap< 1777 + jacquard_common::smol_str::SmolStr, 1778 + jacquard_common::types::value::Data<'a>, 1779 + >, 1780 + ) -> InterestsPref<'a> { 1781 + InterestsPref { 1782 + tags: self.__unsafe_private_named.0.unwrap(), 1783 + extra_data: Some(extra_data), 1784 + } 1785 + } 1786 + } 1787 + 1788 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for InterestsPref<'a> { 1789 + fn nsid() -> &'static str { 1790 + "app.bsky.actor.defs" 1791 + } 1792 + fn def_name() -> &'static str { 1793 + "interestsPref" 1794 + } 1795 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1796 + lexicon_doc_app_bsky_actor_defs() 1797 + } 1798 + fn validate( 1799 + &self, 1800 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1801 + { 1802 + let value = &self.tags; 1803 + #[allow(unused_comparisons)] 1804 + if value.len() > 100usize { 1805 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 1806 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 1807 + "tags", 1808 + ), 1809 + max: 100usize, 1810 + actual: value.len(), 1811 + }); 1812 + } 1813 + } 1814 + Ok(()) 1815 + } 1816 + } 1817 + 165 1818 #[jacquard_derive::lexicon] 166 1819 #[derive( 167 1820 serde::Serialize, ··· 170 1823 Clone, 171 1824 PartialEq, 172 1825 Eq, 173 - jacquard_derive::IntoStatic, 174 - bon::Builder 1826 + jacquard_derive::IntoStatic 175 1827 )] 176 1828 #[serde(rename_all = "camelCase")] 177 1829 pub struct LabelerPrefItem<'a> { ··· 179 1831 pub did: jacquard_common::types::string::Did<'a>, 180 1832 } 181 1833 1834 + pub mod labeler_pref_item_state { 1835 + 1836 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 1837 + #[allow(unused)] 1838 + use ::core::marker::PhantomData; 1839 + mod sealed { 1840 + pub trait Sealed {} 1841 + } 1842 + /// State trait tracking which required fields have been set 1843 + pub trait State: sealed::Sealed { 1844 + type Did; 1845 + } 1846 + /// Empty state - all required fields are unset 1847 + pub struct Empty(()); 1848 + impl sealed::Sealed for Empty {} 1849 + impl State for Empty { 1850 + type Did = Unset; 1851 + } 1852 + ///State transition - sets the `did` field to Set 1853 + pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 1854 + impl<S: State> sealed::Sealed for SetDid<S> {} 1855 + impl<S: State> State for SetDid<S> { 1856 + type Did = Set<members::did>; 1857 + } 1858 + /// Marker types for field names 1859 + #[allow(non_camel_case_types)] 1860 + pub mod members { 1861 + ///Marker type for the `did` field 1862 + pub struct did(()); 1863 + } 1864 + } 1865 + 1866 + /// Builder for constructing an instance of this type 1867 + pub struct LabelerPrefItemBuilder<'a, S: labeler_pref_item_state::State> { 1868 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 1869 + __unsafe_private_named: ( 1870 + ::core::option::Option<jacquard_common::types::string::Did<'a>>, 1871 + ), 1872 + _phantom: ::core::marker::PhantomData<&'a ()>, 1873 + } 1874 + 1875 + impl<'a> LabelerPrefItem<'a> { 1876 + /// Create a new builder for this type 1877 + pub fn new() -> LabelerPrefItemBuilder<'a, labeler_pref_item_state::Empty> { 1878 + LabelerPrefItemBuilder::new() 1879 + } 1880 + } 1881 + 1882 + impl<'a> LabelerPrefItemBuilder<'a, labeler_pref_item_state::Empty> { 1883 + /// Create a new builder with all fields unset 1884 + pub fn new() -> Self { 1885 + LabelerPrefItemBuilder { 1886 + _phantom_state: ::core::marker::PhantomData, 1887 + __unsafe_private_named: (None,), 1888 + _phantom: ::core::marker::PhantomData, 1889 + } 1890 + } 1891 + } 1892 + 1893 + impl<'a, S> LabelerPrefItemBuilder<'a, S> 1894 + where 1895 + S: labeler_pref_item_state::State, 1896 + S::Did: labeler_pref_item_state::IsUnset, 1897 + { 1898 + /// Set the `did` field (required) 1899 + pub fn did( 1900 + mut self, 1901 + value: impl Into<jacquard_common::types::string::Did<'a>>, 1902 + ) -> LabelerPrefItemBuilder<'a, labeler_pref_item_state::SetDid<S>> { 1903 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 1904 + LabelerPrefItemBuilder { 1905 + _phantom_state: ::core::marker::PhantomData, 1906 + __unsafe_private_named: self.__unsafe_private_named, 1907 + _phantom: ::core::marker::PhantomData, 1908 + } 1909 + } 1910 + } 1911 + 1912 + impl<'a, S> LabelerPrefItemBuilder<'a, S> 1913 + where 1914 + S: labeler_pref_item_state::State, 1915 + S::Did: labeler_pref_item_state::IsSet, 1916 + { 1917 + /// Build the final struct 1918 + pub fn build(self) -> LabelerPrefItem<'a> { 1919 + LabelerPrefItem { 1920 + did: self.__unsafe_private_named.0.unwrap(), 1921 + extra_data: Default::default(), 1922 + } 1923 + } 1924 + /// Build the final struct with custom extra_data 1925 + pub fn build_with_data( 1926 + self, 1927 + extra_data: std::collections::BTreeMap< 1928 + jacquard_common::smol_str::SmolStr, 1929 + jacquard_common::types::value::Data<'a>, 1930 + >, 1931 + ) -> LabelerPrefItem<'a> { 1932 + LabelerPrefItem { 1933 + did: self.__unsafe_private_named.0.unwrap(), 1934 + extra_data: Some(extra_data), 1935 + } 1936 + } 1937 + } 1938 + 1939 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LabelerPrefItem<'a> { 1940 + fn nsid() -> &'static str { 1941 + "app.bsky.actor.defs" 1942 + } 1943 + fn def_name() -> &'static str { 1944 + "labelerPrefItem" 1945 + } 1946 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1947 + lexicon_doc_app_bsky_actor_defs() 1948 + } 1949 + fn validate( 1950 + &self, 1951 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1952 + Ok(()) 1953 + } 1954 + } 1955 + 182 1956 #[jacquard_derive::lexicon] 183 1957 #[derive( 184 1958 serde::Serialize, ··· 187 1961 Clone, 188 1962 PartialEq, 189 1963 Eq, 190 - jacquard_derive::IntoStatic, 191 - bon::Builder 1964 + jacquard_derive::IntoStatic 192 1965 )] 193 1966 #[serde(rename_all = "camelCase")] 194 1967 pub struct LabelersPref<'a> { ··· 196 1969 pub labelers: Vec<crate::app_bsky::actor::LabelerPrefItem<'a>>, 197 1970 } 198 1971 1972 + pub mod labelers_pref_state { 1973 + 1974 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 1975 + #[allow(unused)] 1976 + use ::core::marker::PhantomData; 1977 + mod sealed { 1978 + pub trait Sealed {} 1979 + } 1980 + /// State trait tracking which required fields have been set 1981 + pub trait State: sealed::Sealed { 1982 + type Labelers; 1983 + } 1984 + /// Empty state - all required fields are unset 1985 + pub struct Empty(()); 1986 + impl sealed::Sealed for Empty {} 1987 + impl State for Empty { 1988 + type Labelers = Unset; 1989 + } 1990 + ///State transition - sets the `labelers` field to Set 1991 + pub struct SetLabelers<S: State = Empty>(PhantomData<fn() -> S>); 1992 + impl<S: State> sealed::Sealed for SetLabelers<S> {} 1993 + impl<S: State> State for SetLabelers<S> { 1994 + type Labelers = Set<members::labelers>; 1995 + } 1996 + /// Marker types for field names 1997 + #[allow(non_camel_case_types)] 1998 + pub mod members { 1999 + ///Marker type for the `labelers` field 2000 + pub struct labelers(()); 2001 + } 2002 + } 2003 + 2004 + /// Builder for constructing an instance of this type 2005 + pub struct LabelersPrefBuilder<'a, S: labelers_pref_state::State> { 2006 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 2007 + __unsafe_private_named: ( 2008 + ::core::option::Option<Vec<crate::app_bsky::actor::LabelerPrefItem<'a>>>, 2009 + ), 2010 + _phantom: ::core::marker::PhantomData<&'a ()>, 2011 + } 2012 + 2013 + impl<'a> LabelersPref<'a> { 2014 + /// Create a new builder for this type 2015 + pub fn new() -> LabelersPrefBuilder<'a, labelers_pref_state::Empty> { 2016 + LabelersPrefBuilder::new() 2017 + } 2018 + } 2019 + 2020 + impl<'a> LabelersPrefBuilder<'a, labelers_pref_state::Empty> { 2021 + /// Create a new builder with all fields unset 2022 + pub fn new() -> Self { 2023 + LabelersPrefBuilder { 2024 + _phantom_state: ::core::marker::PhantomData, 2025 + __unsafe_private_named: (None,), 2026 + _phantom: ::core::marker::PhantomData, 2027 + } 2028 + } 2029 + } 2030 + 2031 + impl<'a, S> LabelersPrefBuilder<'a, S> 2032 + where 2033 + S: labelers_pref_state::State, 2034 + S::Labelers: labelers_pref_state::IsUnset, 2035 + { 2036 + /// Set the `labelers` field (required) 2037 + pub fn labelers( 2038 + mut self, 2039 + value: impl Into<Vec<crate::app_bsky::actor::LabelerPrefItem<'a>>>, 2040 + ) -> LabelersPrefBuilder<'a, labelers_pref_state::SetLabelers<S>> { 2041 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 2042 + LabelersPrefBuilder { 2043 + _phantom_state: ::core::marker::PhantomData, 2044 + __unsafe_private_named: self.__unsafe_private_named, 2045 + _phantom: ::core::marker::PhantomData, 2046 + } 2047 + } 2048 + } 2049 + 2050 + impl<'a, S> LabelersPrefBuilder<'a, S> 2051 + where 2052 + S: labelers_pref_state::State, 2053 + S::Labelers: labelers_pref_state::IsSet, 2054 + { 2055 + /// Build the final struct 2056 + pub fn build(self) -> LabelersPref<'a> { 2057 + LabelersPref { 2058 + labelers: self.__unsafe_private_named.0.unwrap(), 2059 + extra_data: Default::default(), 2060 + } 2061 + } 2062 + /// Build the final struct with custom extra_data 2063 + pub fn build_with_data( 2064 + self, 2065 + extra_data: std::collections::BTreeMap< 2066 + jacquard_common::smol_str::SmolStr, 2067 + jacquard_common::types::value::Data<'a>, 2068 + >, 2069 + ) -> LabelersPref<'a> { 2070 + LabelersPref { 2071 + labelers: self.__unsafe_private_named.0.unwrap(), 2072 + extra_data: Some(extra_data), 2073 + } 2074 + } 2075 + } 2076 + 2077 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LabelersPref<'a> { 2078 + fn nsid() -> &'static str { 2079 + "app.bsky.actor.defs" 2080 + } 2081 + fn def_name() -> &'static str { 2082 + "labelersPref" 2083 + } 2084 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 2085 + lexicon_doc_app_bsky_actor_defs() 2086 + } 2087 + fn validate( 2088 + &self, 2089 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 2090 + Ok(()) 2091 + } 2092 + } 2093 + 199 2094 /// A word that the account owner has muted. 200 2095 #[jacquard_derive::lexicon] 201 2096 #[derive( ··· 205 2100 Clone, 206 2101 PartialEq, 207 2102 Eq, 208 - jacquard_derive::IntoStatic, 209 - bon::Builder 2103 + jacquard_derive::IntoStatic 210 2104 )] 211 2105 #[serde(rename_all = "camelCase")] 212 2106 pub struct MutedWord<'a> { 213 2107 /// Groups of users to apply the muted word to. If undefined, applies to all users. 214 2108 #[serde(skip_serializing_if = "std::option::Option::is_none")] 215 - #[builder(into)] 216 2109 #[serde(borrow)] 217 - pub actor_target: Option<jacquard_common::CowStr<'a>>, 2110 + pub actor_target: std::option::Option<MutedWordActorTarget<'a>>, 218 2111 /// The date and time at which the muted word will expire and no longer be applied. 219 2112 #[serde(skip_serializing_if = "std::option::Option::is_none")] 220 - #[builder(into)] 221 - pub expires_at: Option<jacquard_common::types::string::Datetime>, 2113 + pub expires_at: std::option::Option<jacquard_common::types::string::Datetime>, 222 2114 #[serde(skip_serializing_if = "std::option::Option::is_none")] 223 - #[builder(into)] 224 2115 #[serde(borrow)] 225 - pub id: Option<jacquard_common::CowStr<'a>>, 2116 + pub id: std::option::Option<jacquard_common::CowStr<'a>>, 226 2117 /// The intended targets of the muted word. 227 2118 #[serde(borrow)] 228 2119 pub targets: Vec<crate::app_bsky::actor::MutedWordTarget<'a>>, 229 2120 /// The muted word itself. 230 2121 #[serde(borrow)] 231 - #[builder(into)] 232 2122 pub value: jacquard_common::CowStr<'a>, 233 2123 } 234 2124 2125 + pub mod muted_word_state { 2126 + 2127 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 2128 + #[allow(unused)] 2129 + use ::core::marker::PhantomData; 2130 + mod sealed { 2131 + pub trait Sealed {} 2132 + } 2133 + /// State trait tracking which required fields have been set 2134 + pub trait State: sealed::Sealed { 2135 + type Value; 2136 + type Targets; 2137 + } 2138 + /// Empty state - all required fields are unset 2139 + pub struct Empty(()); 2140 + impl sealed::Sealed for Empty {} 2141 + impl State for Empty { 2142 + type Value = Unset; 2143 + type Targets = Unset; 2144 + } 2145 + ///State transition - sets the `value` field to Set 2146 + pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>); 2147 + impl<S: State> sealed::Sealed for SetValue<S> {} 2148 + impl<S: State> State for SetValue<S> { 2149 + type Value = Set<members::value>; 2150 + type Targets = S::Targets; 2151 + } 2152 + ///State transition - sets the `targets` field to Set 2153 + pub struct SetTargets<S: State = Empty>(PhantomData<fn() -> S>); 2154 + impl<S: State> sealed::Sealed for SetTargets<S> {} 2155 + impl<S: State> State for SetTargets<S> { 2156 + type Value = S::Value; 2157 + type Targets = Set<members::targets>; 2158 + } 2159 + /// Marker types for field names 2160 + #[allow(non_camel_case_types)] 2161 + pub mod members { 2162 + ///Marker type for the `value` field 2163 + pub struct value(()); 2164 + ///Marker type for the `targets` field 2165 + pub struct targets(()); 2166 + } 2167 + } 2168 + 2169 + /// Builder for constructing an instance of this type 2170 + pub struct MutedWordBuilder<'a, S: muted_word_state::State> { 2171 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 2172 + __unsafe_private_named: ( 2173 + ::core::option::Option<MutedWordActorTarget<'a>>, 2174 + ::core::option::Option<jacquard_common::types::string::Datetime>, 2175 + ::core::option::Option<jacquard_common::CowStr<'a>>, 2176 + ::core::option::Option<Vec<crate::app_bsky::actor::MutedWordTarget<'a>>>, 2177 + ::core::option::Option<jacquard_common::CowStr<'a>>, 2178 + ), 2179 + _phantom: ::core::marker::PhantomData<&'a ()>, 2180 + } 2181 + 2182 + impl<'a> MutedWord<'a> { 2183 + /// Create a new builder for this type 2184 + pub fn new() -> MutedWordBuilder<'a, muted_word_state::Empty> { 2185 + MutedWordBuilder::new() 2186 + } 2187 + } 2188 + 2189 + impl<'a> MutedWordBuilder<'a, muted_word_state::Empty> { 2190 + /// Create a new builder with all fields unset 2191 + pub fn new() -> Self { 2192 + MutedWordBuilder { 2193 + _phantom_state: ::core::marker::PhantomData, 2194 + __unsafe_private_named: (None, None, None, None, None), 2195 + _phantom: ::core::marker::PhantomData, 2196 + } 2197 + } 2198 + } 2199 + 2200 + impl<'a, S: muted_word_state::State> MutedWordBuilder<'a, S> { 2201 + /// Set the `actorTarget` field (optional) 2202 + pub fn actor_target( 2203 + mut self, 2204 + value: impl Into<Option<MutedWordActorTarget<'a>>>, 2205 + ) -> Self { 2206 + self.__unsafe_private_named.0 = value.into(); 2207 + self 2208 + } 2209 + /// Set the `actorTarget` field to an Option value (optional) 2210 + pub fn maybe_actor_target( 2211 + mut self, 2212 + value: Option<MutedWordActorTarget<'a>>, 2213 + ) -> Self { 2214 + self.__unsafe_private_named.0 = value; 2215 + self 2216 + } 2217 + } 2218 + 2219 + impl<'a, S: muted_word_state::State> MutedWordBuilder<'a, S> { 2220 + /// Set the `expiresAt` field (optional) 2221 + pub fn expires_at( 2222 + mut self, 2223 + value: impl Into<Option<jacquard_common::types::string::Datetime>>, 2224 + ) -> Self { 2225 + self.__unsafe_private_named.1 = value.into(); 2226 + self 2227 + } 2228 + /// Set the `expiresAt` field to an Option value (optional) 2229 + pub fn maybe_expires_at( 2230 + mut self, 2231 + value: Option<jacquard_common::types::string::Datetime>, 2232 + ) -> Self { 2233 + self.__unsafe_private_named.1 = value; 2234 + self 2235 + } 2236 + } 2237 + 2238 + impl<'a, S: muted_word_state::State> MutedWordBuilder<'a, S> { 2239 + /// Set the `id` field (optional) 2240 + pub fn id(mut self, value: impl Into<Option<jacquard_common::CowStr<'a>>>) -> Self { 2241 + self.__unsafe_private_named.2 = value.into(); 2242 + self 2243 + } 2244 + /// Set the `id` field to an Option value (optional) 2245 + pub fn maybe_id(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self { 2246 + self.__unsafe_private_named.2 = value; 2247 + self 2248 + } 2249 + } 2250 + 2251 + impl<'a, S> MutedWordBuilder<'a, S> 2252 + where 2253 + S: muted_word_state::State, 2254 + S::Targets: muted_word_state::IsUnset, 2255 + { 2256 + /// Set the `targets` field (required) 2257 + pub fn targets( 2258 + mut self, 2259 + value: impl Into<Vec<crate::app_bsky::actor::MutedWordTarget<'a>>>, 2260 + ) -> MutedWordBuilder<'a, muted_word_state::SetTargets<S>> { 2261 + self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); 2262 + MutedWordBuilder { 2263 + _phantom_state: ::core::marker::PhantomData, 2264 + __unsafe_private_named: self.__unsafe_private_named, 2265 + _phantom: ::core::marker::PhantomData, 2266 + } 2267 + } 2268 + } 2269 + 2270 + impl<'a, S> MutedWordBuilder<'a, S> 2271 + where 2272 + S: muted_word_state::State, 2273 + S::Value: muted_word_state::IsUnset, 2274 + { 2275 + /// Set the `value` field (required) 2276 + pub fn value( 2277 + mut self, 2278 + value: impl Into<jacquard_common::CowStr<'a>>, 2279 + ) -> MutedWordBuilder<'a, muted_word_state::SetValue<S>> { 2280 + self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); 2281 + MutedWordBuilder { 2282 + _phantom_state: ::core::marker::PhantomData, 2283 + __unsafe_private_named: self.__unsafe_private_named, 2284 + _phantom: ::core::marker::PhantomData, 2285 + } 2286 + } 2287 + } 2288 + 2289 + impl<'a, S> MutedWordBuilder<'a, S> 2290 + where 2291 + S: muted_word_state::State, 2292 + S::Value: muted_word_state::IsSet, 2293 + S::Targets: muted_word_state::IsSet, 2294 + { 2295 + /// Build the final struct 2296 + pub fn build(self) -> MutedWord<'a> { 2297 + MutedWord { 2298 + actor_target: self.__unsafe_private_named.0, 2299 + expires_at: self.__unsafe_private_named.1, 2300 + id: self.__unsafe_private_named.2, 2301 + targets: self.__unsafe_private_named.3.unwrap(), 2302 + value: self.__unsafe_private_named.4.unwrap(), 2303 + extra_data: Default::default(), 2304 + } 2305 + } 2306 + /// Build the final struct with custom extra_data 2307 + pub fn build_with_data( 2308 + self, 2309 + extra_data: std::collections::BTreeMap< 2310 + jacquard_common::smol_str::SmolStr, 2311 + jacquard_common::types::value::Data<'a>, 2312 + >, 2313 + ) -> MutedWord<'a> { 2314 + MutedWord { 2315 + actor_target: self.__unsafe_private_named.0, 2316 + expires_at: self.__unsafe_private_named.1, 2317 + id: self.__unsafe_private_named.2, 2318 + targets: self.__unsafe_private_named.3.unwrap(), 2319 + value: self.__unsafe_private_named.4.unwrap(), 2320 + extra_data: Some(extra_data), 2321 + } 2322 + } 2323 + } 2324 + 2325 + /// Groups of users to apply the muted word to. If undefined, applies to all users. 2326 + #[derive(Debug, Clone, PartialEq, Eq, Hash)] 2327 + pub enum MutedWordActorTarget<'a> { 2328 + All, 2329 + ExcludeFollowing, 2330 + Other(jacquard_common::CowStr<'a>), 2331 + } 2332 + 2333 + impl<'a> MutedWordActorTarget<'a> { 2334 + pub fn as_str(&self) -> &str { 2335 + match self { 2336 + Self::All => "all", 2337 + Self::ExcludeFollowing => "exclude-following", 2338 + Self::Other(s) => s.as_ref(), 2339 + } 2340 + } 2341 + } 2342 + 2343 + impl<'a> From<&'a str> for MutedWordActorTarget<'a> { 2344 + fn from(s: &'a str) -> Self { 2345 + match s { 2346 + "all" => Self::All, 2347 + "exclude-following" => Self::ExcludeFollowing, 2348 + _ => Self::Other(jacquard_common::CowStr::from(s)), 2349 + } 2350 + } 2351 + } 2352 + 2353 + impl<'a> From<String> for MutedWordActorTarget<'a> { 2354 + fn from(s: String) -> Self { 2355 + match s.as_str() { 2356 + "all" => Self::All, 2357 + "exclude-following" => Self::ExcludeFollowing, 2358 + _ => Self::Other(jacquard_common::CowStr::from(s)), 2359 + } 2360 + } 2361 + } 2362 + 2363 + impl<'a> core::fmt::Display for MutedWordActorTarget<'a> { 2364 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 2365 + write!(f, "{}", self.as_str()) 2366 + } 2367 + } 2368 + 2369 + impl<'a> AsRef<str> for MutedWordActorTarget<'a> { 2370 + fn as_ref(&self) -> &str { 2371 + self.as_str() 2372 + } 2373 + } 2374 + 2375 + impl<'a> serde::Serialize for MutedWordActorTarget<'a> { 2376 + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> 2377 + where 2378 + S: serde::Serializer, 2379 + { 2380 + serializer.serialize_str(self.as_str()) 2381 + } 2382 + } 2383 + 2384 + impl<'de, 'a> serde::Deserialize<'de> for MutedWordActorTarget<'a> 2385 + where 2386 + 'de: 'a, 2387 + { 2388 + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> 2389 + where 2390 + D: serde::Deserializer<'de>, 2391 + { 2392 + let s = <&'de str>::deserialize(deserializer)?; 2393 + Ok(Self::from(s)) 2394 + } 2395 + } 2396 + 2397 + impl<'a> Default for MutedWordActorTarget<'a> { 2398 + fn default() -> Self { 2399 + Self::Other(Default::default()) 2400 + } 2401 + } 2402 + 2403 + impl jacquard_common::IntoStatic for MutedWordActorTarget<'_> { 2404 + type Output = MutedWordActorTarget<'static>; 2405 + fn into_static(self) -> Self::Output { 2406 + match self { 2407 + MutedWordActorTarget::All => MutedWordActorTarget::All, 2408 + MutedWordActorTarget::ExcludeFollowing => { 2409 + MutedWordActorTarget::ExcludeFollowing 2410 + } 2411 + MutedWordActorTarget::Other(v) => { 2412 + MutedWordActorTarget::Other(v.into_static()) 2413 + } 2414 + } 2415 + } 2416 + } 2417 + 2418 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MutedWord<'a> { 2419 + fn nsid() -> &'static str { 2420 + "app.bsky.actor.defs" 2421 + } 2422 + fn def_name() -> &'static str { 2423 + "mutedWord" 2424 + } 2425 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 2426 + lexicon_doc_app_bsky_actor_defs() 2427 + } 2428 + fn validate( 2429 + &self, 2430 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 2431 + { 2432 + let value = &self.value; 2433 + #[allow(unused_comparisons)] 2434 + if <str>::len(value.as_ref()) > 10000usize { 2435 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 2436 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 2437 + "value", 2438 + ), 2439 + max: 10000usize, 2440 + actual: <str>::len(value.as_ref()), 2441 + }); 2442 + } 2443 + } 2444 + { 2445 + let value = &self.value; 2446 + { 2447 + let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( 2448 + value.as_ref(), 2449 + true, 2450 + ) 2451 + .count(); 2452 + if count > 1000usize { 2453 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { 2454 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 2455 + "value", 2456 + ), 2457 + max: 1000usize, 2458 + actual: count, 2459 + }); 2460 + } 2461 + } 2462 + } 2463 + Ok(()) 2464 + } 2465 + } 2466 + 235 2467 #[derive(Debug, Clone, PartialEq, Eq, Hash)] 236 2468 pub enum MutedWordTarget<'a> { 237 2469 Content, ··· 272 2504 impl<'a> AsRef<str> for MutedWordTarget<'a> { 273 2505 fn as_ref(&self) -> &str { 274 2506 self.as_str() 2507 + } 2508 + } 2509 + 2510 + impl<'a> core::fmt::Display for MutedWordTarget<'a> { 2511 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 2512 + write!(f, "{}", self.as_str()) 275 2513 } 276 2514 } 277 2515 ··· 316 2554 Clone, 317 2555 PartialEq, 318 2556 Eq, 319 - jacquard_derive::IntoStatic, 320 - bon::Builder 2557 + jacquard_derive::IntoStatic 321 2558 )] 322 2559 #[serde(rename_all = "camelCase")] 323 2560 pub struct MutedWordsPref<'a> { ··· 326 2563 pub items: Vec<crate::app_bsky::actor::MutedWord<'a>>, 327 2564 } 328 2565 2566 + pub mod muted_words_pref_state { 2567 + 2568 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 2569 + #[allow(unused)] 2570 + use ::core::marker::PhantomData; 2571 + mod sealed { 2572 + pub trait Sealed {} 2573 + } 2574 + /// State trait tracking which required fields have been set 2575 + pub trait State: sealed::Sealed { 2576 + type Items; 2577 + } 2578 + /// Empty state - all required fields are unset 2579 + pub struct Empty(()); 2580 + impl sealed::Sealed for Empty {} 2581 + impl State for Empty { 2582 + type Items = Unset; 2583 + } 2584 + ///State transition - sets the `items` field to Set 2585 + pub struct SetItems<S: State = Empty>(PhantomData<fn() -> S>); 2586 + impl<S: State> sealed::Sealed for SetItems<S> {} 2587 + impl<S: State> State for SetItems<S> { 2588 + type Items = Set<members::items>; 2589 + } 2590 + /// Marker types for field names 2591 + #[allow(non_camel_case_types)] 2592 + pub mod members { 2593 + ///Marker type for the `items` field 2594 + pub struct items(()); 2595 + } 2596 + } 2597 + 2598 + /// Builder for constructing an instance of this type 2599 + pub struct MutedWordsPrefBuilder<'a, S: muted_words_pref_state::State> { 2600 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 2601 + __unsafe_private_named: ( 2602 + ::core::option::Option<Vec<crate::app_bsky::actor::MutedWord<'a>>>, 2603 + ), 2604 + _phantom: ::core::marker::PhantomData<&'a ()>, 2605 + } 2606 + 2607 + impl<'a> MutedWordsPref<'a> { 2608 + /// Create a new builder for this type 2609 + pub fn new() -> MutedWordsPrefBuilder<'a, muted_words_pref_state::Empty> { 2610 + MutedWordsPrefBuilder::new() 2611 + } 2612 + } 2613 + 2614 + impl<'a> MutedWordsPrefBuilder<'a, muted_words_pref_state::Empty> { 2615 + /// Create a new builder with all fields unset 2616 + pub fn new() -> Self { 2617 + MutedWordsPrefBuilder { 2618 + _phantom_state: ::core::marker::PhantomData, 2619 + __unsafe_private_named: (None,), 2620 + _phantom: ::core::marker::PhantomData, 2621 + } 2622 + } 2623 + } 2624 + 2625 + impl<'a, S> MutedWordsPrefBuilder<'a, S> 2626 + where 2627 + S: muted_words_pref_state::State, 2628 + S::Items: muted_words_pref_state::IsUnset, 2629 + { 2630 + /// Set the `items` field (required) 2631 + pub fn items( 2632 + mut self, 2633 + value: impl Into<Vec<crate::app_bsky::actor::MutedWord<'a>>>, 2634 + ) -> MutedWordsPrefBuilder<'a, muted_words_pref_state::SetItems<S>> { 2635 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 2636 + MutedWordsPrefBuilder { 2637 + _phantom_state: ::core::marker::PhantomData, 2638 + __unsafe_private_named: self.__unsafe_private_named, 2639 + _phantom: ::core::marker::PhantomData, 2640 + } 2641 + } 2642 + } 2643 + 2644 + impl<'a, S> MutedWordsPrefBuilder<'a, S> 2645 + where 2646 + S: muted_words_pref_state::State, 2647 + S::Items: muted_words_pref_state::IsSet, 2648 + { 2649 + /// Build the final struct 2650 + pub fn build(self) -> MutedWordsPref<'a> { 2651 + MutedWordsPref { 2652 + items: self.__unsafe_private_named.0.unwrap(), 2653 + extra_data: Default::default(), 2654 + } 2655 + } 2656 + /// Build the final struct with custom extra_data 2657 + pub fn build_with_data( 2658 + self, 2659 + extra_data: std::collections::BTreeMap< 2660 + jacquard_common::smol_str::SmolStr, 2661 + jacquard_common::types::value::Data<'a>, 2662 + >, 2663 + ) -> MutedWordsPref<'a> { 2664 + MutedWordsPref { 2665 + items: self.__unsafe_private_named.0.unwrap(), 2666 + extra_data: Some(extra_data), 2667 + } 2668 + } 2669 + } 2670 + 2671 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MutedWordsPref<'a> { 2672 + fn nsid() -> &'static str { 2673 + "app.bsky.actor.defs" 2674 + } 2675 + fn def_name() -> &'static str { 2676 + "mutedWordsPref" 2677 + } 2678 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 2679 + lexicon_doc_app_bsky_actor_defs() 2680 + } 2681 + fn validate( 2682 + &self, 2683 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 2684 + Ok(()) 2685 + } 2686 + } 2687 + 329 2688 /// A new user experiences (NUX) storage object 330 2689 #[jacquard_derive::lexicon] 331 2690 #[derive( ··· 335 2694 Clone, 336 2695 PartialEq, 337 2696 Eq, 338 - jacquard_derive::IntoStatic, 339 - bon::Builder 2697 + jacquard_derive::IntoStatic 340 2698 )] 341 2699 #[serde(rename_all = "camelCase")] 342 2700 pub struct Nux<'a> { 343 2701 pub completed: bool, 344 2702 /// Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. 345 2703 #[serde(skip_serializing_if = "std::option::Option::is_none")] 346 - #[builder(into)] 347 2704 #[serde(borrow)] 348 - pub data: Option<jacquard_common::CowStr<'a>>, 2705 + pub data: std::option::Option<jacquard_common::CowStr<'a>>, 349 2706 /// The date and time at which the NUX will expire and should be considered completed. 350 2707 #[serde(skip_serializing_if = "std::option::Option::is_none")] 351 - #[builder(into)] 352 - pub expires_at: Option<jacquard_common::types::string::Datetime>, 2708 + pub expires_at: std::option::Option<jacquard_common::types::string::Datetime>, 353 2709 #[serde(borrow)] 354 - #[builder(into)] 355 2710 pub id: jacquard_common::CowStr<'a>, 356 2711 } 357 2712 2713 + pub mod nux_state { 2714 + 2715 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 2716 + #[allow(unused)] 2717 + use ::core::marker::PhantomData; 2718 + mod sealed { 2719 + pub trait Sealed {} 2720 + } 2721 + /// State trait tracking which required fields have been set 2722 + pub trait State: sealed::Sealed { 2723 + type Id; 2724 + type Completed; 2725 + } 2726 + /// Empty state - all required fields are unset 2727 + pub struct Empty(()); 2728 + impl sealed::Sealed for Empty {} 2729 + impl State for Empty { 2730 + type Id = Unset; 2731 + type Completed = Unset; 2732 + } 2733 + ///State transition - sets the `id` field to Set 2734 + pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>); 2735 + impl<S: State> sealed::Sealed for SetId<S> {} 2736 + impl<S: State> State for SetId<S> { 2737 + type Id = Set<members::id>; 2738 + type Completed = S::Completed; 2739 + } 2740 + ///State transition - sets the `completed` field to Set 2741 + pub struct SetCompleted<S: State = Empty>(PhantomData<fn() -> S>); 2742 + impl<S: State> sealed::Sealed for SetCompleted<S> {} 2743 + impl<S: State> State for SetCompleted<S> { 2744 + type Id = S::Id; 2745 + type Completed = Set<members::completed>; 2746 + } 2747 + /// Marker types for field names 2748 + #[allow(non_camel_case_types)] 2749 + pub mod members { 2750 + ///Marker type for the `id` field 2751 + pub struct id(()); 2752 + ///Marker type for the `completed` field 2753 + pub struct completed(()); 2754 + } 2755 + } 2756 + 2757 + /// Builder for constructing an instance of this type 2758 + pub struct NuxBuilder<'a, S: nux_state::State> { 2759 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 2760 + __unsafe_private_named: ( 2761 + ::core::option::Option<bool>, 2762 + ::core::option::Option<jacquard_common::CowStr<'a>>, 2763 + ::core::option::Option<jacquard_common::types::string::Datetime>, 2764 + ::core::option::Option<jacquard_common::CowStr<'a>>, 2765 + ), 2766 + _phantom: ::core::marker::PhantomData<&'a ()>, 2767 + } 2768 + 2769 + impl<'a> Nux<'a> { 2770 + /// Create a new builder for this type 2771 + pub fn new() -> NuxBuilder<'a, nux_state::Empty> { 2772 + NuxBuilder::new() 2773 + } 2774 + } 2775 + 2776 + impl<'a> NuxBuilder<'a, nux_state::Empty> { 2777 + /// Create a new builder with all fields unset 2778 + pub fn new() -> Self { 2779 + NuxBuilder { 2780 + _phantom_state: ::core::marker::PhantomData, 2781 + __unsafe_private_named: (None, None, None, None), 2782 + _phantom: ::core::marker::PhantomData, 2783 + } 2784 + } 2785 + } 2786 + 2787 + impl<'a, S> NuxBuilder<'a, S> 2788 + where 2789 + S: nux_state::State, 2790 + S::Completed: nux_state::IsUnset, 2791 + { 2792 + /// Set the `completed` field (required) 2793 + pub fn completed( 2794 + mut self, 2795 + value: impl Into<bool>, 2796 + ) -> NuxBuilder<'a, nux_state::SetCompleted<S>> { 2797 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 2798 + NuxBuilder { 2799 + _phantom_state: ::core::marker::PhantomData, 2800 + __unsafe_private_named: self.__unsafe_private_named, 2801 + _phantom: ::core::marker::PhantomData, 2802 + } 2803 + } 2804 + } 2805 + 2806 + impl<'a, S: nux_state::State> NuxBuilder<'a, S> { 2807 + /// Set the `data` field (optional) 2808 + pub fn data( 2809 + mut self, 2810 + value: impl Into<Option<jacquard_common::CowStr<'a>>>, 2811 + ) -> Self { 2812 + self.__unsafe_private_named.1 = value.into(); 2813 + self 2814 + } 2815 + /// Set the `data` field to an Option value (optional) 2816 + pub fn maybe_data(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self { 2817 + self.__unsafe_private_named.1 = value; 2818 + self 2819 + } 2820 + } 2821 + 2822 + impl<'a, S: nux_state::State> NuxBuilder<'a, S> { 2823 + /// Set the `expiresAt` field (optional) 2824 + pub fn expires_at( 2825 + mut self, 2826 + value: impl Into<Option<jacquard_common::types::string::Datetime>>, 2827 + ) -> Self { 2828 + self.__unsafe_private_named.2 = value.into(); 2829 + self 2830 + } 2831 + /// Set the `expiresAt` field to an Option value (optional) 2832 + pub fn maybe_expires_at( 2833 + mut self, 2834 + value: Option<jacquard_common::types::string::Datetime>, 2835 + ) -> Self { 2836 + self.__unsafe_private_named.2 = value; 2837 + self 2838 + } 2839 + } 2840 + 2841 + impl<'a, S> NuxBuilder<'a, S> 2842 + where 2843 + S: nux_state::State, 2844 + S::Id: nux_state::IsUnset, 2845 + { 2846 + /// Set the `id` field (required) 2847 + pub fn id( 2848 + mut self, 2849 + value: impl Into<jacquard_common::CowStr<'a>>, 2850 + ) -> NuxBuilder<'a, nux_state::SetId<S>> { 2851 + self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); 2852 + NuxBuilder { 2853 + _phantom_state: ::core::marker::PhantomData, 2854 + __unsafe_private_named: self.__unsafe_private_named, 2855 + _phantom: ::core::marker::PhantomData, 2856 + } 2857 + } 2858 + } 2859 + 2860 + impl<'a, S> NuxBuilder<'a, S> 2861 + where 2862 + S: nux_state::State, 2863 + S::Id: nux_state::IsSet, 2864 + S::Completed: nux_state::IsSet, 2865 + { 2866 + /// Build the final struct 2867 + pub fn build(self) -> Nux<'a> { 2868 + Nux { 2869 + completed: self.__unsafe_private_named.0.unwrap(), 2870 + data: self.__unsafe_private_named.1, 2871 + expires_at: self.__unsafe_private_named.2, 2872 + id: self.__unsafe_private_named.3.unwrap(), 2873 + extra_data: Default::default(), 2874 + } 2875 + } 2876 + /// Build the final struct with custom extra_data 2877 + pub fn build_with_data( 2878 + self, 2879 + extra_data: std::collections::BTreeMap< 2880 + jacquard_common::smol_str::SmolStr, 2881 + jacquard_common::types::value::Data<'a>, 2882 + >, 2883 + ) -> Nux<'a> { 2884 + Nux { 2885 + completed: self.__unsafe_private_named.0.unwrap(), 2886 + data: self.__unsafe_private_named.1, 2887 + expires_at: self.__unsafe_private_named.2, 2888 + id: self.__unsafe_private_named.3.unwrap(), 2889 + extra_data: Some(extra_data), 2890 + } 2891 + } 2892 + } 2893 + 2894 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Nux<'a> { 2895 + fn nsid() -> &'static str { 2896 + "app.bsky.actor.defs" 2897 + } 2898 + fn def_name() -> &'static str { 2899 + "nux" 2900 + } 2901 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 2902 + lexicon_doc_app_bsky_actor_defs() 2903 + } 2904 + fn validate( 2905 + &self, 2906 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 2907 + if let Some(ref value) = self.data { 2908 + #[allow(unused_comparisons)] 2909 + if <str>::len(value.as_ref()) > 3000usize { 2910 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 2911 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 2912 + "data", 2913 + ), 2914 + max: 3000usize, 2915 + actual: <str>::len(value.as_ref()), 2916 + }); 2917 + } 2918 + } 2919 + if let Some(ref value) = self.data { 2920 + { 2921 + let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( 2922 + value.as_ref(), 2923 + true, 2924 + ) 2925 + .count(); 2926 + if count > 300usize { 2927 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { 2928 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 2929 + "data", 2930 + ), 2931 + max: 300usize, 2932 + actual: count, 2933 + }); 2934 + } 2935 + } 2936 + } 2937 + { 2938 + let value = &self.id; 2939 + #[allow(unused_comparisons)] 2940 + if <str>::len(value.as_ref()) > 100usize { 2941 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 2942 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 2943 + "id", 2944 + ), 2945 + max: 100usize, 2946 + actual: <str>::len(value.as_ref()), 2947 + }); 2948 + } 2949 + } 2950 + Ok(()) 2951 + } 2952 + } 2953 + 358 2954 #[jacquard_derive::lexicon] 359 2955 #[derive( 360 2956 serde::Serialize, ··· 371 2967 /// The birth date of account owner. 372 2968 #[serde(skip_serializing_if = "std::option::Option::is_none")] 373 2969 pub birth_date: std::option::Option<jacquard_common::types::string::Datetime>, 2970 + } 2971 + 2972 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PersonalDetailsPref<'a> { 2973 + fn nsid() -> &'static str { 2974 + "app.bsky.actor.defs" 2975 + } 2976 + fn def_name() -> &'static str { 2977 + "personalDetailsPref" 2978 + } 2979 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 2980 + lexicon_doc_app_bsky_actor_defs() 2981 + } 2982 + fn validate( 2983 + &self, 2984 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 2985 + Ok(()) 2986 + } 374 2987 } 375 2988 376 2989 /// Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. ··· 424 3037 ThreadgateListRule(Box<crate::app_bsky::feed::threadgate::ListRule<'a>>), 425 3038 } 426 3039 3040 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PostInteractionSettingsPref<'a> { 3041 + fn nsid() -> &'static str { 3042 + "app.bsky.actor.defs" 3043 + } 3044 + fn def_name() -> &'static str { 3045 + "postInteractionSettingsPref" 3046 + } 3047 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 3048 + lexicon_doc_app_bsky_actor_defs() 3049 + } 3050 + fn validate( 3051 + &self, 3052 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 3053 + if let Some(ref value) = self.postgate_embedding_rules { 3054 + #[allow(unused_comparisons)] 3055 + if value.len() > 5usize { 3056 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 3057 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 3058 + "postgate_embedding_rules", 3059 + ), 3060 + max: 5usize, 3061 + actual: value.len(), 3062 + }); 3063 + } 3064 + } 3065 + if let Some(ref value) = self.threadgate_allow_rules { 3066 + #[allow(unused_comparisons)] 3067 + if value.len() > 5usize { 3068 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 3069 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 3070 + "threadgate_allow_rules", 3071 + ), 3072 + max: 5usize, 3073 + actual: value.len(), 3074 + }); 3075 + } 3076 + } 3077 + Ok(()) 3078 + } 3079 + } 3080 + 427 3081 #[jacquard_derive::open_union] 428 3082 #[derive( 429 3083 serde::Serialize, ··· 478 3132 Clone, 479 3133 PartialEq, 480 3134 Eq, 481 - jacquard_derive::IntoStatic, 482 - bon::Builder 3135 + jacquard_derive::IntoStatic 483 3136 )] 484 3137 #[serde(rename_all = "camelCase")] 485 3138 pub struct SavedFeed<'a> { 486 3139 #[serde(borrow)] 487 - #[builder(into)] 488 3140 pub id: jacquard_common::CowStr<'a>, 489 3141 pub pinned: bool, 490 3142 #[serde(borrow)] 491 - #[builder(into)] 492 - pub r#type: jacquard_common::CowStr<'a>, 3143 + pub r#type: SavedFeedType<'a>, 493 3144 #[serde(borrow)] 494 - #[builder(into)] 495 3145 pub value: jacquard_common::CowStr<'a>, 496 3146 } 497 3147 3148 + pub mod saved_feed_state { 3149 + 3150 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 3151 + #[allow(unused)] 3152 + use ::core::marker::PhantomData; 3153 + mod sealed { 3154 + pub trait Sealed {} 3155 + } 3156 + /// State trait tracking which required fields have been set 3157 + pub trait State: sealed::Sealed { 3158 + type Id; 3159 + type Value; 3160 + type Pinned; 3161 + type Type; 3162 + } 3163 + /// Empty state - all required fields are unset 3164 + pub struct Empty(()); 3165 + impl sealed::Sealed for Empty {} 3166 + impl State for Empty { 3167 + type Id = Unset; 3168 + type Value = Unset; 3169 + type Pinned = Unset; 3170 + type Type = Unset; 3171 + } 3172 + ///State transition - sets the `id` field to Set 3173 + pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>); 3174 + impl<S: State> sealed::Sealed for SetId<S> {} 3175 + impl<S: State> State for SetId<S> { 3176 + type Id = Set<members::id>; 3177 + type Value = S::Value; 3178 + type Pinned = S::Pinned; 3179 + type Type = S::Type; 3180 + } 3181 + ///State transition - sets the `value` field to Set 3182 + pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>); 3183 + impl<S: State> sealed::Sealed for SetValue<S> {} 3184 + impl<S: State> State for SetValue<S> { 3185 + type Id = S::Id; 3186 + type Value = Set<members::value>; 3187 + type Pinned = S::Pinned; 3188 + type Type = S::Type; 3189 + } 3190 + ///State transition - sets the `pinned` field to Set 3191 + pub struct SetPinned<S: State = Empty>(PhantomData<fn() -> S>); 3192 + impl<S: State> sealed::Sealed for SetPinned<S> {} 3193 + impl<S: State> State for SetPinned<S> { 3194 + type Id = S::Id; 3195 + type Value = S::Value; 3196 + type Pinned = Set<members::pinned>; 3197 + type Type = S::Type; 3198 + } 3199 + ///State transition - sets the `type` field to Set 3200 + pub struct SetType<S: State = Empty>(PhantomData<fn() -> S>); 3201 + impl<S: State> sealed::Sealed for SetType<S> {} 3202 + impl<S: State> State for SetType<S> { 3203 + type Id = S::Id; 3204 + type Value = S::Value; 3205 + type Pinned = S::Pinned; 3206 + type Type = Set<members::r#type>; 3207 + } 3208 + /// Marker types for field names 3209 + #[allow(non_camel_case_types)] 3210 + pub mod members { 3211 + ///Marker type for the `id` field 3212 + pub struct id(()); 3213 + ///Marker type for the `value` field 3214 + pub struct value(()); 3215 + ///Marker type for the `pinned` field 3216 + pub struct pinned(()); 3217 + ///Marker type for the `type` field 3218 + pub struct r#type(()); 3219 + } 3220 + } 3221 + 3222 + /// Builder for constructing an instance of this type 3223 + pub struct SavedFeedBuilder<'a, S: saved_feed_state::State> { 3224 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 3225 + __unsafe_private_named: ( 3226 + ::core::option::Option<jacquard_common::CowStr<'a>>, 3227 + ::core::option::Option<bool>, 3228 + ::core::option::Option<SavedFeedType<'a>>, 3229 + ::core::option::Option<jacquard_common::CowStr<'a>>, 3230 + ), 3231 + _phantom: ::core::marker::PhantomData<&'a ()>, 3232 + } 3233 + 3234 + impl<'a> SavedFeed<'a> { 3235 + /// Create a new builder for this type 3236 + pub fn new() -> SavedFeedBuilder<'a, saved_feed_state::Empty> { 3237 + SavedFeedBuilder::new() 3238 + } 3239 + } 3240 + 3241 + impl<'a> SavedFeedBuilder<'a, saved_feed_state::Empty> { 3242 + /// Create a new builder with all fields unset 3243 + pub fn new() -> Self { 3244 + SavedFeedBuilder { 3245 + _phantom_state: ::core::marker::PhantomData, 3246 + __unsafe_private_named: (None, None, None, None), 3247 + _phantom: ::core::marker::PhantomData, 3248 + } 3249 + } 3250 + } 3251 + 3252 + impl<'a, S> SavedFeedBuilder<'a, S> 3253 + where 3254 + S: saved_feed_state::State, 3255 + S::Id: saved_feed_state::IsUnset, 3256 + { 3257 + /// Set the `id` field (required) 3258 + pub fn id( 3259 + mut self, 3260 + value: impl Into<jacquard_common::CowStr<'a>>, 3261 + ) -> SavedFeedBuilder<'a, saved_feed_state::SetId<S>> { 3262 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 3263 + SavedFeedBuilder { 3264 + _phantom_state: ::core::marker::PhantomData, 3265 + __unsafe_private_named: self.__unsafe_private_named, 3266 + _phantom: ::core::marker::PhantomData, 3267 + } 3268 + } 3269 + } 3270 + 3271 + impl<'a, S> SavedFeedBuilder<'a, S> 3272 + where 3273 + S: saved_feed_state::State, 3274 + S::Pinned: saved_feed_state::IsUnset, 3275 + { 3276 + /// Set the `pinned` field (required) 3277 + pub fn pinned( 3278 + mut self, 3279 + value: impl Into<bool>, 3280 + ) -> SavedFeedBuilder<'a, saved_feed_state::SetPinned<S>> { 3281 + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 3282 + SavedFeedBuilder { 3283 + _phantom_state: ::core::marker::PhantomData, 3284 + __unsafe_private_named: self.__unsafe_private_named, 3285 + _phantom: ::core::marker::PhantomData, 3286 + } 3287 + } 3288 + } 3289 + 3290 + impl<'a, S> SavedFeedBuilder<'a, S> 3291 + where 3292 + S: saved_feed_state::State, 3293 + S::Type: saved_feed_state::IsUnset, 3294 + { 3295 + /// Set the `type` field (required) 3296 + pub fn r#type( 3297 + mut self, 3298 + value: impl Into<SavedFeedType<'a>>, 3299 + ) -> SavedFeedBuilder<'a, saved_feed_state::SetType<S>> { 3300 + self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); 3301 + SavedFeedBuilder { 3302 + _phantom_state: ::core::marker::PhantomData, 3303 + __unsafe_private_named: self.__unsafe_private_named, 3304 + _phantom: ::core::marker::PhantomData, 3305 + } 3306 + } 3307 + } 3308 + 3309 + impl<'a, S> SavedFeedBuilder<'a, S> 3310 + where 3311 + S: saved_feed_state::State, 3312 + S::Value: saved_feed_state::IsUnset, 3313 + { 3314 + /// Set the `value` field (required) 3315 + pub fn value( 3316 + mut self, 3317 + value: impl Into<jacquard_common::CowStr<'a>>, 3318 + ) -> SavedFeedBuilder<'a, saved_feed_state::SetValue<S>> { 3319 + self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); 3320 + SavedFeedBuilder { 3321 + _phantom_state: ::core::marker::PhantomData, 3322 + __unsafe_private_named: self.__unsafe_private_named, 3323 + _phantom: ::core::marker::PhantomData, 3324 + } 3325 + } 3326 + } 3327 + 3328 + impl<'a, S> SavedFeedBuilder<'a, S> 3329 + where 3330 + S: saved_feed_state::State, 3331 + S::Id: saved_feed_state::IsSet, 3332 + S::Value: saved_feed_state::IsSet, 3333 + S::Pinned: saved_feed_state::IsSet, 3334 + S::Type: saved_feed_state::IsSet, 3335 + { 3336 + /// Build the final struct 3337 + pub fn build(self) -> SavedFeed<'a> { 3338 + SavedFeed { 3339 + id: self.__unsafe_private_named.0.unwrap(), 3340 + pinned: self.__unsafe_private_named.1.unwrap(), 3341 + r#type: self.__unsafe_private_named.2.unwrap(), 3342 + value: self.__unsafe_private_named.3.unwrap(), 3343 + extra_data: Default::default(), 3344 + } 3345 + } 3346 + /// Build the final struct with custom extra_data 3347 + pub fn build_with_data( 3348 + self, 3349 + extra_data: std::collections::BTreeMap< 3350 + jacquard_common::smol_str::SmolStr, 3351 + jacquard_common::types::value::Data<'a>, 3352 + >, 3353 + ) -> SavedFeed<'a> { 3354 + SavedFeed { 3355 + id: self.__unsafe_private_named.0.unwrap(), 3356 + pinned: self.__unsafe_private_named.1.unwrap(), 3357 + r#type: self.__unsafe_private_named.2.unwrap(), 3358 + value: self.__unsafe_private_named.3.unwrap(), 3359 + extra_data: Some(extra_data), 3360 + } 3361 + } 3362 + } 3363 + 3364 + #[derive(Debug, Clone, PartialEq, Eq, Hash)] 3365 + pub enum SavedFeedType<'a> { 3366 + Feed, 3367 + List, 3368 + Timeline, 3369 + Other(jacquard_common::CowStr<'a>), 3370 + } 3371 + 3372 + impl<'a> SavedFeedType<'a> { 3373 + pub fn as_str(&self) -> &str { 3374 + match self { 3375 + Self::Feed => "feed", 3376 + Self::List => "list", 3377 + Self::Timeline => "timeline", 3378 + Self::Other(s) => s.as_ref(), 3379 + } 3380 + } 3381 + } 3382 + 3383 + impl<'a> From<&'a str> for SavedFeedType<'a> { 3384 + fn from(s: &'a str) -> Self { 3385 + match s { 3386 + "feed" => Self::Feed, 3387 + "list" => Self::List, 3388 + "timeline" => Self::Timeline, 3389 + _ => Self::Other(jacquard_common::CowStr::from(s)), 3390 + } 3391 + } 3392 + } 3393 + 3394 + impl<'a> From<String> for SavedFeedType<'a> { 3395 + fn from(s: String) -> Self { 3396 + match s.as_str() { 3397 + "feed" => Self::Feed, 3398 + "list" => Self::List, 3399 + "timeline" => Self::Timeline, 3400 + _ => Self::Other(jacquard_common::CowStr::from(s)), 3401 + } 3402 + } 3403 + } 3404 + 3405 + impl<'a> core::fmt::Display for SavedFeedType<'a> { 3406 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 3407 + write!(f, "{}", self.as_str()) 3408 + } 3409 + } 3410 + 3411 + impl<'a> AsRef<str> for SavedFeedType<'a> { 3412 + fn as_ref(&self) -> &str { 3413 + self.as_str() 3414 + } 3415 + } 3416 + 3417 + impl<'a> serde::Serialize for SavedFeedType<'a> { 3418 + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> 3419 + where 3420 + S: serde::Serializer, 3421 + { 3422 + serializer.serialize_str(self.as_str()) 3423 + } 3424 + } 3425 + 3426 + impl<'de, 'a> serde::Deserialize<'de> for SavedFeedType<'a> 3427 + where 3428 + 'de: 'a, 3429 + { 3430 + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> 3431 + where 3432 + D: serde::Deserializer<'de>, 3433 + { 3434 + let s = <&'de str>::deserialize(deserializer)?; 3435 + Ok(Self::from(s)) 3436 + } 3437 + } 3438 + 3439 + impl<'a> Default for SavedFeedType<'a> { 3440 + fn default() -> Self { 3441 + Self::Other(Default::default()) 3442 + } 3443 + } 3444 + 3445 + impl jacquard_common::IntoStatic for SavedFeedType<'_> { 3446 + type Output = SavedFeedType<'static>; 3447 + fn into_static(self) -> Self::Output { 3448 + match self { 3449 + SavedFeedType::Feed => SavedFeedType::Feed, 3450 + SavedFeedType::List => SavedFeedType::List, 3451 + SavedFeedType::Timeline => SavedFeedType::Timeline, 3452 + SavedFeedType::Other(v) => SavedFeedType::Other(v.into_static()), 3453 + } 3454 + } 3455 + } 3456 + 3457 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SavedFeed<'a> { 3458 + fn nsid() -> &'static str { 3459 + "app.bsky.actor.defs" 3460 + } 3461 + fn def_name() -> &'static str { 3462 + "savedFeed" 3463 + } 3464 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 3465 + lexicon_doc_app_bsky_actor_defs() 3466 + } 3467 + fn validate( 3468 + &self, 3469 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 3470 + Ok(()) 3471 + } 3472 + } 3473 + 498 3474 #[jacquard_derive::lexicon] 499 3475 #[derive( 500 3476 serde::Serialize, ··· 503 3479 Clone, 504 3480 PartialEq, 505 3481 Eq, 506 - jacquard_derive::IntoStatic, 507 - bon::Builder 3482 + jacquard_derive::IntoStatic 508 3483 )] 509 3484 #[serde(rename_all = "camelCase")] 510 3485 pub struct SavedFeedsPref<'a> { ··· 513 3488 #[serde(borrow)] 514 3489 pub saved: Vec<jacquard_common::types::string::AtUri<'a>>, 515 3490 #[serde(skip_serializing_if = "std::option::Option::is_none")] 516 - #[builder(into)] 517 - pub timeline_index: Option<i64>, 3491 + pub timeline_index: std::option::Option<i64>, 3492 + } 3493 + 3494 + pub mod saved_feeds_pref_state { 3495 + 3496 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 3497 + #[allow(unused)] 3498 + use ::core::marker::PhantomData; 3499 + mod sealed { 3500 + pub trait Sealed {} 3501 + } 3502 + /// State trait tracking which required fields have been set 3503 + pub trait State: sealed::Sealed { 3504 + type Pinned; 3505 + type Saved; 3506 + } 3507 + /// Empty state - all required fields are unset 3508 + pub struct Empty(()); 3509 + impl sealed::Sealed for Empty {} 3510 + impl State for Empty { 3511 + type Pinned = Unset; 3512 + type Saved = Unset; 3513 + } 3514 + ///State transition - sets the `pinned` field to Set 3515 + pub struct SetPinned<S: State = Empty>(PhantomData<fn() -> S>); 3516 + impl<S: State> sealed::Sealed for SetPinned<S> {} 3517 + impl<S: State> State for SetPinned<S> { 3518 + type Pinned = Set<members::pinned>; 3519 + type Saved = S::Saved; 3520 + } 3521 + ///State transition - sets the `saved` field to Set 3522 + pub struct SetSaved<S: State = Empty>(PhantomData<fn() -> S>); 3523 + impl<S: State> sealed::Sealed for SetSaved<S> {} 3524 + impl<S: State> State for SetSaved<S> { 3525 + type Pinned = S::Pinned; 3526 + type Saved = Set<members::saved>; 3527 + } 3528 + /// Marker types for field names 3529 + #[allow(non_camel_case_types)] 3530 + pub mod members { 3531 + ///Marker type for the `pinned` field 3532 + pub struct pinned(()); 3533 + ///Marker type for the `saved` field 3534 + pub struct saved(()); 3535 + } 3536 + } 3537 + 3538 + /// Builder for constructing an instance of this type 3539 + pub struct SavedFeedsPrefBuilder<'a, S: saved_feeds_pref_state::State> { 3540 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 3541 + __unsafe_private_named: ( 3542 + ::core::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 3543 + ::core::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 3544 + ::core::option::Option<i64>, 3545 + ), 3546 + _phantom: ::core::marker::PhantomData<&'a ()>, 3547 + } 3548 + 3549 + impl<'a> SavedFeedsPref<'a> { 3550 + /// Create a new builder for this type 3551 + pub fn new() -> SavedFeedsPrefBuilder<'a, saved_feeds_pref_state::Empty> { 3552 + SavedFeedsPrefBuilder::new() 3553 + } 3554 + } 3555 + 3556 + impl<'a> SavedFeedsPrefBuilder<'a, saved_feeds_pref_state::Empty> { 3557 + /// Create a new builder with all fields unset 3558 + pub fn new() -> Self { 3559 + SavedFeedsPrefBuilder { 3560 + _phantom_state: ::core::marker::PhantomData, 3561 + __unsafe_private_named: (None, None, None), 3562 + _phantom: ::core::marker::PhantomData, 3563 + } 3564 + } 3565 + } 3566 + 3567 + impl<'a, S> SavedFeedsPrefBuilder<'a, S> 3568 + where 3569 + S: saved_feeds_pref_state::State, 3570 + S::Pinned: saved_feeds_pref_state::IsUnset, 3571 + { 3572 + /// Set the `pinned` field (required) 3573 + pub fn pinned( 3574 + mut self, 3575 + value: impl Into<Vec<jacquard_common::types::string::AtUri<'a>>>, 3576 + ) -> SavedFeedsPrefBuilder<'a, saved_feeds_pref_state::SetPinned<S>> { 3577 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 3578 + SavedFeedsPrefBuilder { 3579 + _phantom_state: ::core::marker::PhantomData, 3580 + __unsafe_private_named: self.__unsafe_private_named, 3581 + _phantom: ::core::marker::PhantomData, 3582 + } 3583 + } 3584 + } 3585 + 3586 + impl<'a, S> SavedFeedsPrefBuilder<'a, S> 3587 + where 3588 + S: saved_feeds_pref_state::State, 3589 + S::Saved: saved_feeds_pref_state::IsUnset, 3590 + { 3591 + /// Set the `saved` field (required) 3592 + pub fn saved( 3593 + mut self, 3594 + value: impl Into<Vec<jacquard_common::types::string::AtUri<'a>>>, 3595 + ) -> SavedFeedsPrefBuilder<'a, saved_feeds_pref_state::SetSaved<S>> { 3596 + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 3597 + SavedFeedsPrefBuilder { 3598 + _phantom_state: ::core::marker::PhantomData, 3599 + __unsafe_private_named: self.__unsafe_private_named, 3600 + _phantom: ::core::marker::PhantomData, 3601 + } 3602 + } 3603 + } 3604 + 3605 + impl<'a, S: saved_feeds_pref_state::State> SavedFeedsPrefBuilder<'a, S> { 3606 + /// Set the `timelineIndex` field (optional) 3607 + pub fn timeline_index(mut self, value: impl Into<Option<i64>>) -> Self { 3608 + self.__unsafe_private_named.2 = value.into(); 3609 + self 3610 + } 3611 + /// Set the `timelineIndex` field to an Option value (optional) 3612 + pub fn maybe_timeline_index(mut self, value: Option<i64>) -> Self { 3613 + self.__unsafe_private_named.2 = value; 3614 + self 3615 + } 3616 + } 3617 + 3618 + impl<'a, S> SavedFeedsPrefBuilder<'a, S> 3619 + where 3620 + S: saved_feeds_pref_state::State, 3621 + S::Pinned: saved_feeds_pref_state::IsSet, 3622 + S::Saved: saved_feeds_pref_state::IsSet, 3623 + { 3624 + /// Build the final struct 3625 + pub fn build(self) -> SavedFeedsPref<'a> { 3626 + SavedFeedsPref { 3627 + pinned: self.__unsafe_private_named.0.unwrap(), 3628 + saved: self.__unsafe_private_named.1.unwrap(), 3629 + timeline_index: self.__unsafe_private_named.2, 3630 + extra_data: Default::default(), 3631 + } 3632 + } 3633 + /// Build the final struct with custom extra_data 3634 + pub fn build_with_data( 3635 + self, 3636 + extra_data: std::collections::BTreeMap< 3637 + jacquard_common::smol_str::SmolStr, 3638 + jacquard_common::types::value::Data<'a>, 3639 + >, 3640 + ) -> SavedFeedsPref<'a> { 3641 + SavedFeedsPref { 3642 + pinned: self.__unsafe_private_named.0.unwrap(), 3643 + saved: self.__unsafe_private_named.1.unwrap(), 3644 + timeline_index: self.__unsafe_private_named.2, 3645 + extra_data: Some(extra_data), 3646 + } 3647 + } 3648 + } 3649 + 3650 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SavedFeedsPref<'a> { 3651 + fn nsid() -> &'static str { 3652 + "app.bsky.actor.defs" 3653 + } 3654 + fn def_name() -> &'static str { 3655 + "savedFeedsPref" 3656 + } 3657 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 3658 + lexicon_doc_app_bsky_actor_defs() 3659 + } 3660 + fn validate( 3661 + &self, 3662 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 3663 + Ok(()) 3664 + } 518 3665 } 519 3666 520 3667 #[jacquard_derive::lexicon] ··· 525 3672 Clone, 526 3673 PartialEq, 527 3674 Eq, 528 - jacquard_derive::IntoStatic, 529 - bon::Builder 3675 + jacquard_derive::IntoStatic 530 3676 )] 531 3677 #[serde(rename_all = "camelCase")] 532 3678 pub struct SavedFeedsPrefV2<'a> { ··· 534 3680 pub items: Vec<crate::app_bsky::actor::SavedFeed<'a>>, 535 3681 } 536 3682 3683 + pub mod saved_feeds_pref_v2_state { 3684 + 3685 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 3686 + #[allow(unused)] 3687 + use ::core::marker::PhantomData; 3688 + mod sealed { 3689 + pub trait Sealed {} 3690 + } 3691 + /// State trait tracking which required fields have been set 3692 + pub trait State: sealed::Sealed { 3693 + type Items; 3694 + } 3695 + /// Empty state - all required fields are unset 3696 + pub struct Empty(()); 3697 + impl sealed::Sealed for Empty {} 3698 + impl State for Empty { 3699 + type Items = Unset; 3700 + } 3701 + ///State transition - sets the `items` field to Set 3702 + pub struct SetItems<S: State = Empty>(PhantomData<fn() -> S>); 3703 + impl<S: State> sealed::Sealed for SetItems<S> {} 3704 + impl<S: State> State for SetItems<S> { 3705 + type Items = Set<members::items>; 3706 + } 3707 + /// Marker types for field names 3708 + #[allow(non_camel_case_types)] 3709 + pub mod members { 3710 + ///Marker type for the `items` field 3711 + pub struct items(()); 3712 + } 3713 + } 3714 + 3715 + /// Builder for constructing an instance of this type 3716 + pub struct SavedFeedsPrefV2Builder<'a, S: saved_feeds_pref_v2_state::State> { 3717 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 3718 + __unsafe_private_named: ( 3719 + ::core::option::Option<Vec<crate::app_bsky::actor::SavedFeed<'a>>>, 3720 + ), 3721 + _phantom: ::core::marker::PhantomData<&'a ()>, 3722 + } 3723 + 3724 + impl<'a> SavedFeedsPrefV2<'a> { 3725 + /// Create a new builder for this type 3726 + pub fn new() -> SavedFeedsPrefV2Builder<'a, saved_feeds_pref_v2_state::Empty> { 3727 + SavedFeedsPrefV2Builder::new() 3728 + } 3729 + } 3730 + 3731 + impl<'a> SavedFeedsPrefV2Builder<'a, saved_feeds_pref_v2_state::Empty> { 3732 + /// Create a new builder with all fields unset 3733 + pub fn new() -> Self { 3734 + SavedFeedsPrefV2Builder { 3735 + _phantom_state: ::core::marker::PhantomData, 3736 + __unsafe_private_named: (None,), 3737 + _phantom: ::core::marker::PhantomData, 3738 + } 3739 + } 3740 + } 3741 + 3742 + impl<'a, S> SavedFeedsPrefV2Builder<'a, S> 3743 + where 3744 + S: saved_feeds_pref_v2_state::State, 3745 + S::Items: saved_feeds_pref_v2_state::IsUnset, 3746 + { 3747 + /// Set the `items` field (required) 3748 + pub fn items( 3749 + mut self, 3750 + value: impl Into<Vec<crate::app_bsky::actor::SavedFeed<'a>>>, 3751 + ) -> SavedFeedsPrefV2Builder<'a, saved_feeds_pref_v2_state::SetItems<S>> { 3752 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 3753 + SavedFeedsPrefV2Builder { 3754 + _phantom_state: ::core::marker::PhantomData, 3755 + __unsafe_private_named: self.__unsafe_private_named, 3756 + _phantom: ::core::marker::PhantomData, 3757 + } 3758 + } 3759 + } 3760 + 3761 + impl<'a, S> SavedFeedsPrefV2Builder<'a, S> 3762 + where 3763 + S: saved_feeds_pref_v2_state::State, 3764 + S::Items: saved_feeds_pref_v2_state::IsSet, 3765 + { 3766 + /// Build the final struct 3767 + pub fn build(self) -> SavedFeedsPrefV2<'a> { 3768 + SavedFeedsPrefV2 { 3769 + items: self.__unsafe_private_named.0.unwrap(), 3770 + extra_data: Default::default(), 3771 + } 3772 + } 3773 + /// Build the final struct with custom extra_data 3774 + pub fn build_with_data( 3775 + self, 3776 + extra_data: std::collections::BTreeMap< 3777 + jacquard_common::smol_str::SmolStr, 3778 + jacquard_common::types::value::Data<'a>, 3779 + >, 3780 + ) -> SavedFeedsPrefV2<'a> { 3781 + SavedFeedsPrefV2 { 3782 + items: self.__unsafe_private_named.0.unwrap(), 3783 + extra_data: Some(extra_data), 3784 + } 3785 + } 3786 + } 3787 + 3788 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SavedFeedsPrefV2<'a> { 3789 + fn nsid() -> &'static str { 3790 + "app.bsky.actor.defs" 3791 + } 3792 + fn def_name() -> &'static str { 3793 + "savedFeedsPrefV2" 3794 + } 3795 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 3796 + lexicon_doc_app_bsky_actor_defs() 3797 + } 3798 + fn validate( 3799 + &self, 3800 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 3801 + Ok(()) 3802 + } 3803 + } 3804 + 537 3805 #[jacquard_derive::lexicon] 538 3806 #[derive( 539 3807 serde::Serialize, ··· 553 3821 /// Sorting mode for threads. 554 3822 #[serde(skip_serializing_if = "std::option::Option::is_none")] 555 3823 #[serde(borrow)] 556 - pub sort: std::option::Option<jacquard_common::CowStr<'a>>, 3824 + pub sort: std::option::Option<ThreadViewPrefSort<'a>>, 3825 + } 3826 + 3827 + /// Sorting mode for threads. 3828 + #[derive(Debug, Clone, PartialEq, Eq, Hash)] 3829 + pub enum ThreadViewPrefSort<'a> { 3830 + Oldest, 3831 + Newest, 3832 + MostLikes, 3833 + Random, 3834 + Hotness, 3835 + Other(jacquard_common::CowStr<'a>), 3836 + } 3837 + 3838 + impl<'a> ThreadViewPrefSort<'a> { 3839 + pub fn as_str(&self) -> &str { 3840 + match self { 3841 + Self::Oldest => "oldest", 3842 + Self::Newest => "newest", 3843 + Self::MostLikes => "most-likes", 3844 + Self::Random => "random", 3845 + Self::Hotness => "hotness", 3846 + Self::Other(s) => s.as_ref(), 3847 + } 3848 + } 3849 + } 3850 + 3851 + impl<'a> From<&'a str> for ThreadViewPrefSort<'a> { 3852 + fn from(s: &'a str) -> Self { 3853 + match s { 3854 + "oldest" => Self::Oldest, 3855 + "newest" => Self::Newest, 3856 + "most-likes" => Self::MostLikes, 3857 + "random" => Self::Random, 3858 + "hotness" => Self::Hotness, 3859 + _ => Self::Other(jacquard_common::CowStr::from(s)), 3860 + } 3861 + } 3862 + } 3863 + 3864 + impl<'a> From<String> for ThreadViewPrefSort<'a> { 3865 + fn from(s: String) -> Self { 3866 + match s.as_str() { 3867 + "oldest" => Self::Oldest, 3868 + "newest" => Self::Newest, 3869 + "most-likes" => Self::MostLikes, 3870 + "random" => Self::Random, 3871 + "hotness" => Self::Hotness, 3872 + _ => Self::Other(jacquard_common::CowStr::from(s)), 3873 + } 3874 + } 3875 + } 3876 + 3877 + impl<'a> core::fmt::Display for ThreadViewPrefSort<'a> { 3878 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 3879 + write!(f, "{}", self.as_str()) 3880 + } 3881 + } 3882 + 3883 + impl<'a> AsRef<str> for ThreadViewPrefSort<'a> { 3884 + fn as_ref(&self) -> &str { 3885 + self.as_str() 3886 + } 3887 + } 3888 + 3889 + impl<'a> serde::Serialize for ThreadViewPrefSort<'a> { 3890 + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> 3891 + where 3892 + S: serde::Serializer, 3893 + { 3894 + serializer.serialize_str(self.as_str()) 3895 + } 3896 + } 3897 + 3898 + impl<'de, 'a> serde::Deserialize<'de> for ThreadViewPrefSort<'a> 3899 + where 3900 + 'de: 'a, 3901 + { 3902 + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> 3903 + where 3904 + D: serde::Deserializer<'de>, 3905 + { 3906 + let s = <&'de str>::deserialize(deserializer)?; 3907 + Ok(Self::from(s)) 3908 + } 3909 + } 3910 + 3911 + impl<'a> Default for ThreadViewPrefSort<'a> { 3912 + fn default() -> Self { 3913 + Self::Other(Default::default()) 3914 + } 3915 + } 3916 + 3917 + impl jacquard_common::IntoStatic for ThreadViewPrefSort<'_> { 3918 + type Output = ThreadViewPrefSort<'static>; 3919 + fn into_static(self) -> Self::Output { 3920 + match self { 3921 + ThreadViewPrefSort::Oldest => ThreadViewPrefSort::Oldest, 3922 + ThreadViewPrefSort::Newest => ThreadViewPrefSort::Newest, 3923 + ThreadViewPrefSort::MostLikes => ThreadViewPrefSort::MostLikes, 3924 + ThreadViewPrefSort::Random => ThreadViewPrefSort::Random, 3925 + ThreadViewPrefSort::Hotness => ThreadViewPrefSort::Hotness, 3926 + ThreadViewPrefSort::Other(v) => ThreadViewPrefSort::Other(v.into_static()), 3927 + } 3928 + } 3929 + } 3930 + 3931 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreadViewPref<'a> { 3932 + fn nsid() -> &'static str { 3933 + "app.bsky.actor.defs" 3934 + } 3935 + fn def_name() -> &'static str { 3936 + "threadViewPref" 3937 + } 3938 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 3939 + lexicon_doc_app_bsky_actor_defs() 3940 + } 3941 + fn validate( 3942 + &self, 3943 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 3944 + Ok(()) 3945 + } 557 3946 } 558 3947 559 3948 /// Preferences for how verified accounts appear in the app. ··· 573 3962 /// Hide the blue check badges for verified accounts and trusted verifiers. 574 3963 #[serde(skip_serializing_if = "std::option::Option::is_none")] 575 3964 pub hide_badges: std::option::Option<bool>, 3965 + } 3966 + 3967 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for VerificationPrefs<'a> { 3968 + fn nsid() -> &'static str { 3969 + "app.bsky.actor.defs" 3970 + } 3971 + fn def_name() -> &'static str { 3972 + "verificationPrefs" 3973 + } 3974 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 3975 + lexicon_doc_app_bsky_actor_defs() 3976 + } 3977 + fn validate( 3978 + &self, 3979 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 3980 + Ok(()) 3981 + } 576 3982 }
+409 -6
lexicon_types_crate/src/app_bsky/feed/postgate.rs
··· 19 19 )] 20 20 #[serde(rename_all = "camelCase")] 21 21 pub struct DisableRule<'a> {} 22 + fn lexicon_doc_app_bsky_feed_postgate() -> ::jacquard_lexicon::lexicon::LexiconDoc< 23 + 'static, 24 + > { 25 + ::jacquard_lexicon::lexicon::LexiconDoc { 26 + lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, 27 + id: ::jacquard_common::CowStr::new_static("app.bsky.feed.postgate"), 28 + revision: None, 29 + description: None, 30 + defs: { 31 + let mut map = ::alloc::collections::BTreeMap::new(); 32 + map.insert( 33 + ::jacquard_common::smol_str::SmolStr::new_static("disableRule"), 34 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 35 + description: Some( 36 + ::jacquard_common::CowStr::new_static( 37 + "Disables embedding of this post.", 38 + ), 39 + ), 40 + required: None, 41 + nullable: None, 42 + properties: { 43 + #[allow(unused_mut)] 44 + let mut map = ::alloc::collections::BTreeMap::new(); 45 + map 46 + }, 47 + }), 48 + ); 49 + map.insert( 50 + ::jacquard_common::smol_str::SmolStr::new_static("main"), 51 + ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord { 52 + description: Some( 53 + ::jacquard_common::CowStr::new_static( 54 + "Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.", 55 + ), 56 + ), 57 + key: Some(::jacquard_common::CowStr::new_static("tid")), 58 + record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject { 59 + description: None, 60 + required: Some( 61 + vec![ 62 + ::jacquard_common::smol_str::SmolStr::new_static("post"), 63 + ::jacquard_common::smol_str::SmolStr::new_static("createdAt") 64 + ], 65 + ), 66 + nullable: None, 67 + properties: { 68 + #[allow(unused_mut)] 69 + let mut map = ::alloc::collections::BTreeMap::new(); 70 + map.insert( 71 + ::jacquard_common::smol_str::SmolStr::new_static( 72 + "createdAt", 73 + ), 74 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 75 + description: None, 76 + format: Some( 77 + ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 78 + ), 79 + default: None, 80 + min_length: None, 81 + max_length: None, 82 + min_graphemes: None, 83 + max_graphemes: None, 84 + r#enum: None, 85 + r#const: None, 86 + known_values: None, 87 + }), 88 + ); 89 + map.insert( 90 + ::jacquard_common::smol_str::SmolStr::new_static( 91 + "detachedEmbeddingUris", 92 + ), 93 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 94 + description: Some( 95 + ::jacquard_common::CowStr::new_static( 96 + "List of AT-URIs embedding this post that the author has detached from.", 97 + ), 98 + ), 99 + items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { 100 + description: None, 101 + format: Some( 102 + ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 103 + ), 104 + default: None, 105 + min_length: None, 106 + max_length: None, 107 + min_graphemes: None, 108 + max_graphemes: None, 109 + r#enum: None, 110 + r#const: None, 111 + known_values: None, 112 + }), 113 + min_length: None, 114 + max_length: Some(50usize), 115 + }), 116 + ); 117 + map.insert( 118 + ::jacquard_common::smol_str::SmolStr::new_static( 119 + "embeddingRules", 120 + ), 121 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 122 + description: Some( 123 + ::jacquard_common::CowStr::new_static( 124 + "List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", 125 + ), 126 + ), 127 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion { 128 + description: None, 129 + refs: vec![ 130 + ::jacquard_common::CowStr::new_static("#disableRule") 131 + ], 132 + closed: None, 133 + }), 134 + min_length: None, 135 + max_length: Some(5usize), 136 + }), 137 + ); 138 + map.insert( 139 + ::jacquard_common::smol_str::SmolStr::new_static("post"), 140 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 141 + description: Some( 142 + ::jacquard_common::CowStr::new_static( 143 + "Reference (AT-URI) to the post record.", 144 + ), 145 + ), 146 + format: Some( 147 + ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 148 + ), 149 + default: None, 150 + min_length: None, 151 + max_length: None, 152 + min_graphemes: None, 153 + max_graphemes: None, 154 + r#enum: None, 155 + r#const: None, 156 + known_values: None, 157 + }), 158 + ); 159 + map 160 + }, 161 + }), 162 + }), 163 + ); 164 + map 165 + }, 166 + } 167 + } 168 + 169 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DisableRule<'a> { 170 + fn nsid() -> &'static str { 171 + "app.bsky.feed.postgate" 172 + } 173 + fn def_name() -> &'static str { 174 + "disableRule" 175 + } 176 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 177 + lexicon_doc_app_bsky_feed_postgate() 178 + } 179 + fn validate( 180 + &self, 181 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 182 + Ok(()) 183 + } 184 + } 185 + 22 186 /// Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. 23 187 #[jacquard_derive::lexicon] 24 188 #[derive( ··· 28 192 Clone, 29 193 PartialEq, 30 194 Eq, 31 - jacquard_derive::IntoStatic, 32 - bon::Builder 195 + jacquard_derive::IntoStatic 33 196 )] 34 197 #[serde(rename_all = "camelCase")] 35 198 pub struct Postgate<'a> { 36 199 pub created_at: jacquard_common::types::string::Datetime, 37 200 /// List of AT-URIs embedding this post that the author has detached from. 38 201 #[serde(skip_serializing_if = "std::option::Option::is_none")] 39 - #[builder(into)] 40 202 #[serde(borrow)] 41 - pub detached_embedding_uris: Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 203 + pub detached_embedding_uris: std::option::Option< 204 + Vec<jacquard_common::types::string::AtUri<'a>>, 205 + >, 42 206 /// List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. 43 207 #[serde(skip_serializing_if = "std::option::Option::is_none")] 44 - #[builder(into)] 45 208 #[serde(borrow)] 46 - pub embedding_rules: Option<Vec<crate::app_bsky::feed::postgate::DisableRule<'a>>>, 209 + pub embedding_rules: std::option::Option< 210 + Vec<crate::app_bsky::feed::postgate::DisableRule<'a>>, 211 + >, 47 212 /// Reference (AT-URI) to the post record. 48 213 #[serde(borrow)] 49 214 pub post: jacquard_common::types::string::AtUri<'a>, 50 215 } 51 216 217 + pub mod postgate_state { 218 + 219 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 220 + #[allow(unused)] 221 + use ::core::marker::PhantomData; 222 + mod sealed { 223 + pub trait Sealed {} 224 + } 225 + /// State trait tracking which required fields have been set 226 + pub trait State: sealed::Sealed { 227 + type CreatedAt; 228 + type Post; 229 + } 230 + /// Empty state - all required fields are unset 231 + pub struct Empty(()); 232 + impl sealed::Sealed for Empty {} 233 + impl State for Empty { 234 + type CreatedAt = Unset; 235 + type Post = Unset; 236 + } 237 + ///State transition - sets the `created_at` field to Set 238 + pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>); 239 + impl<S: State> sealed::Sealed for SetCreatedAt<S> {} 240 + impl<S: State> State for SetCreatedAt<S> { 241 + type CreatedAt = Set<members::created_at>; 242 + type Post = S::Post; 243 + } 244 + ///State transition - sets the `post` field to Set 245 + pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>); 246 + impl<S: State> sealed::Sealed for SetPost<S> {} 247 + impl<S: State> State for SetPost<S> { 248 + type CreatedAt = S::CreatedAt; 249 + type Post = Set<members::post>; 250 + } 251 + /// Marker types for field names 252 + #[allow(non_camel_case_types)] 253 + pub mod members { 254 + ///Marker type for the `created_at` field 255 + pub struct created_at(()); 256 + ///Marker type for the `post` field 257 + pub struct post(()); 258 + } 259 + } 260 + 261 + /// Builder for constructing an instance of this type 262 + pub struct PostgateBuilder<'a, S: postgate_state::State> { 263 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 264 + __unsafe_private_named: ( 265 + ::core::option::Option<jacquard_common::types::string::Datetime>, 266 + ::core::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 267 + ::core::option::Option<Vec<crate::app_bsky::feed::postgate::DisableRule<'a>>>, 268 + ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 269 + ), 270 + _phantom: ::core::marker::PhantomData<&'a ()>, 271 + } 272 + 273 + impl<'a> Postgate<'a> { 274 + /// Create a new builder for this type 275 + pub fn new() -> PostgateBuilder<'a, postgate_state::Empty> { 276 + PostgateBuilder::new() 277 + } 278 + } 279 + 280 + impl<'a> PostgateBuilder<'a, postgate_state::Empty> { 281 + /// Create a new builder with all fields unset 282 + pub fn new() -> Self { 283 + PostgateBuilder { 284 + _phantom_state: ::core::marker::PhantomData, 285 + __unsafe_private_named: (None, None, None, None), 286 + _phantom: ::core::marker::PhantomData, 287 + } 288 + } 289 + } 290 + 291 + impl<'a, S> PostgateBuilder<'a, S> 292 + where 293 + S: postgate_state::State, 294 + S::CreatedAt: postgate_state::IsUnset, 295 + { 296 + /// Set the `createdAt` field (required) 297 + pub fn created_at( 298 + mut self, 299 + value: impl Into<jacquard_common::types::string::Datetime>, 300 + ) -> PostgateBuilder<'a, postgate_state::SetCreatedAt<S>> { 301 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 302 + PostgateBuilder { 303 + _phantom_state: ::core::marker::PhantomData, 304 + __unsafe_private_named: self.__unsafe_private_named, 305 + _phantom: ::core::marker::PhantomData, 306 + } 307 + } 308 + } 309 + 310 + impl<'a, S: postgate_state::State> PostgateBuilder<'a, S> { 311 + /// Set the `detachedEmbeddingUris` field (optional) 312 + pub fn detached_embedding_uris( 313 + mut self, 314 + value: impl Into<Option<Vec<jacquard_common::types::string::AtUri<'a>>>>, 315 + ) -> Self { 316 + self.__unsafe_private_named.1 = value.into(); 317 + self 318 + } 319 + /// Set the `detachedEmbeddingUris` field to an Option value (optional) 320 + pub fn maybe_detached_embedding_uris( 321 + mut self, 322 + value: Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 323 + ) -> Self { 324 + self.__unsafe_private_named.1 = value; 325 + self 326 + } 327 + } 328 + 329 + impl<'a, S: postgate_state::State> PostgateBuilder<'a, S> { 330 + /// Set the `embeddingRules` field (optional) 331 + pub fn embedding_rules( 332 + mut self, 333 + value: impl Into<Option<Vec<crate::app_bsky::feed::postgate::DisableRule<'a>>>>, 334 + ) -> Self { 335 + self.__unsafe_private_named.2 = value.into(); 336 + self 337 + } 338 + /// Set the `embeddingRules` field to an Option value (optional) 339 + pub fn maybe_embedding_rules( 340 + mut self, 341 + value: Option<Vec<crate::app_bsky::feed::postgate::DisableRule<'a>>>, 342 + ) -> Self { 343 + self.__unsafe_private_named.2 = value; 344 + self 345 + } 346 + } 347 + 348 + impl<'a, S> PostgateBuilder<'a, S> 349 + where 350 + S: postgate_state::State, 351 + S::Post: postgate_state::IsUnset, 352 + { 353 + /// Set the `post` field (required) 354 + pub fn post( 355 + mut self, 356 + value: impl Into<jacquard_common::types::string::AtUri<'a>>, 357 + ) -> PostgateBuilder<'a, postgate_state::SetPost<S>> { 358 + self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); 359 + PostgateBuilder { 360 + _phantom_state: ::core::marker::PhantomData, 361 + __unsafe_private_named: self.__unsafe_private_named, 362 + _phantom: ::core::marker::PhantomData, 363 + } 364 + } 365 + } 366 + 367 + impl<'a, S> PostgateBuilder<'a, S> 368 + where 369 + S: postgate_state::State, 370 + S::CreatedAt: postgate_state::IsSet, 371 + S::Post: postgate_state::IsSet, 372 + { 373 + /// Build the final struct 374 + pub fn build(self) -> Postgate<'a> { 375 + Postgate { 376 + created_at: self.__unsafe_private_named.0.unwrap(), 377 + detached_embedding_uris: self.__unsafe_private_named.1, 378 + embedding_rules: self.__unsafe_private_named.2, 379 + post: self.__unsafe_private_named.3.unwrap(), 380 + extra_data: Default::default(), 381 + } 382 + } 383 + /// Build the final struct with custom extra_data 384 + pub fn build_with_data( 385 + self, 386 + extra_data: std::collections::BTreeMap< 387 + jacquard_common::smol_str::SmolStr, 388 + jacquard_common::types::value::Data<'a>, 389 + >, 390 + ) -> Postgate<'a> { 391 + Postgate { 392 + created_at: self.__unsafe_private_named.0.unwrap(), 393 + detached_embedding_uris: self.__unsafe_private_named.1, 394 + embedding_rules: self.__unsafe_private_named.2, 395 + post: self.__unsafe_private_named.3.unwrap(), 396 + extra_data: Some(extra_data), 397 + } 398 + } 399 + } 400 + 401 + impl<'a> Postgate<'a> { 402 + pub fn uri( 403 + uri: impl Into<jacquard_common::CowStr<'a>>, 404 + ) -> Result< 405 + jacquard_common::types::uri::RecordUri<'a, PostgateRecord>, 406 + jacquard_common::types::uri::UriError, 407 + > { 408 + jacquard_common::types::uri::RecordUri::try_from_uri( 409 + jacquard_common::types::string::AtUri::new_cow(uri.into())?, 410 + ) 411 + } 412 + } 413 + 52 414 /// Typed wrapper for GetRecord response with this collection's record type. 53 415 #[derive( 54 416 serde::Serialize, ··· 95 457 impl jacquard_common::types::collection::Collection for PostgateRecord { 96 458 const NSID: &'static str = "app.bsky.feed.postgate"; 97 459 type Record = PostgateRecord; 460 + } 461 + 462 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Postgate<'a> { 463 + fn nsid() -> &'static str { 464 + "app.bsky.feed.postgate" 465 + } 466 + fn def_name() -> &'static str { 467 + "main" 468 + } 469 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 470 + lexicon_doc_app_bsky_feed_postgate() 471 + } 472 + fn validate( 473 + &self, 474 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 475 + if let Some(ref value) = self.detached_embedding_uris { 476 + #[allow(unused_comparisons)] 477 + if value.len() > 50usize { 478 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 479 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 480 + "detached_embedding_uris", 481 + ), 482 + max: 50usize, 483 + actual: value.len(), 484 + }); 485 + } 486 + } 487 + if let Some(ref value) = self.embedding_rules { 488 + #[allow(unused_comparisons)] 489 + if value.len() > 5usize { 490 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 491 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 492 + "embedding_rules", 493 + ), 494 + max: 5usize, 495 + actual: value.len(), 496 + }); 497 + } 498 + } 499 + Ok(()) 500 + } 98 501 }
+632 -9
lexicon_types_crate/src/app_bsky/feed/threadgate.rs
··· 19 19 )] 20 20 #[serde(rename_all = "camelCase")] 21 21 pub struct FollowerRule<'a> {} 22 + fn lexicon_doc_app_bsky_feed_threadgate() -> ::jacquard_lexicon::lexicon::LexiconDoc< 23 + 'static, 24 + > { 25 + ::jacquard_lexicon::lexicon::LexiconDoc { 26 + lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, 27 + id: ::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate"), 28 + revision: None, 29 + description: None, 30 + defs: { 31 + let mut map = ::alloc::collections::BTreeMap::new(); 32 + map.insert( 33 + ::jacquard_common::smol_str::SmolStr::new_static("followerRule"), 34 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 35 + description: Some( 36 + ::jacquard_common::CowStr::new_static( 37 + "Allow replies from actors who follow you.", 38 + ), 39 + ), 40 + required: None, 41 + nullable: None, 42 + properties: { 43 + #[allow(unused_mut)] 44 + let mut map = ::alloc::collections::BTreeMap::new(); 45 + map 46 + }, 47 + }), 48 + ); 49 + map.insert( 50 + ::jacquard_common::smol_str::SmolStr::new_static("followingRule"), 51 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 52 + description: Some( 53 + ::jacquard_common::CowStr::new_static( 54 + "Allow replies from actors you follow.", 55 + ), 56 + ), 57 + required: None, 58 + nullable: None, 59 + properties: { 60 + #[allow(unused_mut)] 61 + let mut map = ::alloc::collections::BTreeMap::new(); 62 + map 63 + }, 64 + }), 65 + ); 66 + map.insert( 67 + ::jacquard_common::smol_str::SmolStr::new_static("listRule"), 68 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 69 + description: Some( 70 + ::jacquard_common::CowStr::new_static( 71 + "Allow replies from actors on a list.", 72 + ), 73 + ), 74 + required: Some( 75 + vec![::jacquard_common::smol_str::SmolStr::new_static("list")], 76 + ), 77 + nullable: None, 78 + properties: { 79 + #[allow(unused_mut)] 80 + let mut map = ::alloc::collections::BTreeMap::new(); 81 + map.insert( 82 + ::jacquard_common::smol_str::SmolStr::new_static("list"), 83 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 84 + description: None, 85 + format: Some( 86 + ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 87 + ), 88 + default: None, 89 + min_length: None, 90 + max_length: None, 91 + min_graphemes: None, 92 + max_graphemes: None, 93 + r#enum: None, 94 + r#const: None, 95 + known_values: None, 96 + }), 97 + ); 98 + map 99 + }, 100 + }), 101 + ); 102 + map.insert( 103 + ::jacquard_common::smol_str::SmolStr::new_static("main"), 104 + ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord { 105 + description: Some( 106 + ::jacquard_common::CowStr::new_static( 107 + "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.", 108 + ), 109 + ), 110 + key: Some(::jacquard_common::CowStr::new_static("tid")), 111 + record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject { 112 + description: None, 113 + required: Some( 114 + vec![ 115 + ::jacquard_common::smol_str::SmolStr::new_static("post"), 116 + ::jacquard_common::smol_str::SmolStr::new_static("createdAt") 117 + ], 118 + ), 119 + nullable: None, 120 + properties: { 121 + #[allow(unused_mut)] 122 + let mut map = ::alloc::collections::BTreeMap::new(); 123 + map.insert( 124 + ::jacquard_common::smol_str::SmolStr::new_static("allow"), 125 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 126 + description: Some( 127 + ::jacquard_common::CowStr::new_static( 128 + "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", 129 + ), 130 + ), 131 + items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion { 132 + description: None, 133 + refs: vec![ 134 + ::jacquard_common::CowStr::new_static("#mentionRule"), 135 + ::jacquard_common::CowStr::new_static("#followerRule"), 136 + ::jacquard_common::CowStr::new_static("#followingRule"), 137 + ::jacquard_common::CowStr::new_static("#listRule") 138 + ], 139 + closed: None, 140 + }), 141 + min_length: None, 142 + max_length: Some(5usize), 143 + }), 144 + ); 145 + map.insert( 146 + ::jacquard_common::smol_str::SmolStr::new_static( 147 + "createdAt", 148 + ), 149 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 150 + description: None, 151 + format: Some( 152 + ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 153 + ), 154 + default: None, 155 + min_length: None, 156 + max_length: None, 157 + min_graphemes: None, 158 + max_graphemes: None, 159 + r#enum: None, 160 + r#const: None, 161 + known_values: None, 162 + }), 163 + ); 164 + map.insert( 165 + ::jacquard_common::smol_str::SmolStr::new_static( 166 + "hiddenReplies", 167 + ), 168 + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 169 + description: Some( 170 + ::jacquard_common::CowStr::new_static( 171 + "List of hidden reply URIs.", 172 + ), 173 + ), 174 + items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { 175 + description: None, 176 + format: Some( 177 + ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 178 + ), 179 + default: None, 180 + min_length: None, 181 + max_length: None, 182 + min_graphemes: None, 183 + max_graphemes: None, 184 + r#enum: None, 185 + r#const: None, 186 + known_values: None, 187 + }), 188 + min_length: None, 189 + max_length: Some(300usize), 190 + }), 191 + ); 192 + map.insert( 193 + ::jacquard_common::smol_str::SmolStr::new_static("post"), 194 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 195 + description: Some( 196 + ::jacquard_common::CowStr::new_static( 197 + "Reference (AT-URI) to the post record.", 198 + ), 199 + ), 200 + format: Some( 201 + ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 202 + ), 203 + default: None, 204 + min_length: None, 205 + max_length: None, 206 + min_graphemes: None, 207 + max_graphemes: None, 208 + r#enum: None, 209 + r#const: None, 210 + known_values: None, 211 + }), 212 + ); 213 + map 214 + }, 215 + }), 216 + }), 217 + ); 218 + map.insert( 219 + ::jacquard_common::smol_str::SmolStr::new_static("mentionRule"), 220 + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 221 + description: Some( 222 + ::jacquard_common::CowStr::new_static( 223 + "Allow replies from actors mentioned in your post.", 224 + ), 225 + ), 226 + required: None, 227 + nullable: None, 228 + properties: { 229 + #[allow(unused_mut)] 230 + let mut map = ::alloc::collections::BTreeMap::new(); 231 + map 232 + }, 233 + }), 234 + ); 235 + map 236 + }, 237 + } 238 + } 239 + 240 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for FollowerRule<'a> { 241 + fn nsid() -> &'static str { 242 + "app.bsky.feed.threadgate" 243 + } 244 + fn def_name() -> &'static str { 245 + "followerRule" 246 + } 247 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 248 + lexicon_doc_app_bsky_feed_threadgate() 249 + } 250 + fn validate( 251 + &self, 252 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 253 + Ok(()) 254 + } 255 + } 256 + 22 257 /// Allow replies from actors you follow. 23 258 #[jacquard_derive::lexicon] 24 259 #[derive( ··· 33 268 )] 34 269 #[serde(rename_all = "camelCase")] 35 270 pub struct FollowingRule<'a> {} 271 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for FollowingRule<'a> { 272 + fn nsid() -> &'static str { 273 + "app.bsky.feed.threadgate" 274 + } 275 + fn def_name() -> &'static str { 276 + "followingRule" 277 + } 278 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 279 + lexicon_doc_app_bsky_feed_threadgate() 280 + } 281 + fn validate( 282 + &self, 283 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 284 + Ok(()) 285 + } 286 + } 287 + 36 288 /// Allow replies from actors on a list. 37 289 #[jacquard_derive::lexicon] 38 290 #[derive( ··· 42 294 Clone, 43 295 PartialEq, 44 296 Eq, 45 - jacquard_derive::IntoStatic, 46 - bon::Builder 297 + jacquard_derive::IntoStatic 47 298 )] 48 299 #[serde(rename_all = "camelCase")] 49 300 pub struct ListRule<'a> { ··· 51 302 pub list: jacquard_common::types::string::AtUri<'a>, 52 303 } 53 304 305 + pub mod list_rule_state { 306 + 307 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 308 + #[allow(unused)] 309 + use ::core::marker::PhantomData; 310 + mod sealed { 311 + pub trait Sealed {} 312 + } 313 + /// State trait tracking which required fields have been set 314 + pub trait State: sealed::Sealed { 315 + type List; 316 + } 317 + /// Empty state - all required fields are unset 318 + pub struct Empty(()); 319 + impl sealed::Sealed for Empty {} 320 + impl State for Empty { 321 + type List = Unset; 322 + } 323 + ///State transition - sets the `list` field to Set 324 + pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>); 325 + impl<S: State> sealed::Sealed for SetList<S> {} 326 + impl<S: State> State for SetList<S> { 327 + type List = Set<members::list>; 328 + } 329 + /// Marker types for field names 330 + #[allow(non_camel_case_types)] 331 + pub mod members { 332 + ///Marker type for the `list` field 333 + pub struct list(()); 334 + } 335 + } 336 + 337 + /// Builder for constructing an instance of this type 338 + pub struct ListRuleBuilder<'a, S: list_rule_state::State> { 339 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 340 + __unsafe_private_named: ( 341 + ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 342 + ), 343 + _phantom: ::core::marker::PhantomData<&'a ()>, 344 + } 345 + 346 + impl<'a> ListRule<'a> { 347 + /// Create a new builder for this type 348 + pub fn new() -> ListRuleBuilder<'a, list_rule_state::Empty> { 349 + ListRuleBuilder::new() 350 + } 351 + } 352 + 353 + impl<'a> ListRuleBuilder<'a, list_rule_state::Empty> { 354 + /// Create a new builder with all fields unset 355 + pub fn new() -> Self { 356 + ListRuleBuilder { 357 + _phantom_state: ::core::marker::PhantomData, 358 + __unsafe_private_named: (None,), 359 + _phantom: ::core::marker::PhantomData, 360 + } 361 + } 362 + } 363 + 364 + impl<'a, S> ListRuleBuilder<'a, S> 365 + where 366 + S: list_rule_state::State, 367 + S::List: list_rule_state::IsUnset, 368 + { 369 + /// Set the `list` field (required) 370 + pub fn list( 371 + mut self, 372 + value: impl Into<jacquard_common::types::string::AtUri<'a>>, 373 + ) -> ListRuleBuilder<'a, list_rule_state::SetList<S>> { 374 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 375 + ListRuleBuilder { 376 + _phantom_state: ::core::marker::PhantomData, 377 + __unsafe_private_named: self.__unsafe_private_named, 378 + _phantom: ::core::marker::PhantomData, 379 + } 380 + } 381 + } 382 + 383 + impl<'a, S> ListRuleBuilder<'a, S> 384 + where 385 + S: list_rule_state::State, 386 + S::List: list_rule_state::IsSet, 387 + { 388 + /// Build the final struct 389 + pub fn build(self) -> ListRule<'a> { 390 + ListRule { 391 + list: self.__unsafe_private_named.0.unwrap(), 392 + extra_data: Default::default(), 393 + } 394 + } 395 + /// Build the final struct with custom extra_data 396 + pub fn build_with_data( 397 + self, 398 + extra_data: std::collections::BTreeMap< 399 + jacquard_common::smol_str::SmolStr, 400 + jacquard_common::types::value::Data<'a>, 401 + >, 402 + ) -> ListRule<'a> { 403 + ListRule { 404 + list: self.__unsafe_private_named.0.unwrap(), 405 + extra_data: Some(extra_data), 406 + } 407 + } 408 + } 409 + 410 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListRule<'a> { 411 + fn nsid() -> &'static str { 412 + "app.bsky.feed.threadgate" 413 + } 414 + fn def_name() -> &'static str { 415 + "listRule" 416 + } 417 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 418 + lexicon_doc_app_bsky_feed_threadgate() 419 + } 420 + fn validate( 421 + &self, 422 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 423 + Ok(()) 424 + } 425 + } 426 + 54 427 /// Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. 55 428 #[jacquard_derive::lexicon] 56 429 #[derive( ··· 60 433 Clone, 61 434 PartialEq, 62 435 Eq, 63 - jacquard_derive::IntoStatic, 64 - bon::Builder 436 + jacquard_derive::IntoStatic 65 437 )] 66 438 #[serde(rename_all = "camelCase")] 67 439 pub struct Threadgate<'a> { 68 440 /// List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. 69 441 #[serde(skip_serializing_if = "std::option::Option::is_none")] 70 - #[builder(into)] 71 442 #[serde(borrow)] 72 - pub allow: Option<Vec<ThreadgateAllowItem<'a>>>, 443 + pub allow: std::option::Option<Vec<ThreadgateAllowItem<'a>>>, 73 444 pub created_at: jacquard_common::types::string::Datetime, 74 445 /// List of hidden reply URIs. 75 446 #[serde(skip_serializing_if = "std::option::Option::is_none")] 76 - #[builder(into)] 77 447 #[serde(borrow)] 78 - pub hidden_replies: Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 448 + pub hidden_replies: std::option::Option< 449 + Vec<jacquard_common::types::string::AtUri<'a>>, 450 + >, 79 451 /// Reference (AT-URI) to the post record. 80 452 #[serde(borrow)] 81 453 pub post: jacquard_common::types::string::AtUri<'a>, 82 454 } 83 455 456 + pub mod threadgate_state { 457 + 458 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 459 + #[allow(unused)] 460 + use ::core::marker::PhantomData; 461 + mod sealed { 462 + pub trait Sealed {} 463 + } 464 + /// State trait tracking which required fields have been set 465 + pub trait State: sealed::Sealed { 466 + type Post; 467 + type CreatedAt; 468 + } 469 + /// Empty state - all required fields are unset 470 + pub struct Empty(()); 471 + impl sealed::Sealed for Empty {} 472 + impl State for Empty { 473 + type Post = Unset; 474 + type CreatedAt = Unset; 475 + } 476 + ///State transition - sets the `post` field to Set 477 + pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>); 478 + impl<S: State> sealed::Sealed for SetPost<S> {} 479 + impl<S: State> State for SetPost<S> { 480 + type Post = Set<members::post>; 481 + type CreatedAt = S::CreatedAt; 482 + } 483 + ///State transition - sets the `created_at` field to Set 484 + pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>); 485 + impl<S: State> sealed::Sealed for SetCreatedAt<S> {} 486 + impl<S: State> State for SetCreatedAt<S> { 487 + type Post = S::Post; 488 + type CreatedAt = Set<members::created_at>; 489 + } 490 + /// Marker types for field names 491 + #[allow(non_camel_case_types)] 492 + pub mod members { 493 + ///Marker type for the `post` field 494 + pub struct post(()); 495 + ///Marker type for the `created_at` field 496 + pub struct created_at(()); 497 + } 498 + } 499 + 500 + /// Builder for constructing an instance of this type 501 + pub struct ThreadgateBuilder<'a, S: threadgate_state::State> { 502 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 503 + __unsafe_private_named: ( 504 + ::core::option::Option<Vec<ThreadgateAllowItem<'a>>>, 505 + ::core::option::Option<jacquard_common::types::string::Datetime>, 506 + ::core::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 507 + ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 508 + ), 509 + _phantom: ::core::marker::PhantomData<&'a ()>, 510 + } 511 + 512 + impl<'a> Threadgate<'a> { 513 + /// Create a new builder for this type 514 + pub fn new() -> ThreadgateBuilder<'a, threadgate_state::Empty> { 515 + ThreadgateBuilder::new() 516 + } 517 + } 518 + 519 + impl<'a> ThreadgateBuilder<'a, threadgate_state::Empty> { 520 + /// Create a new builder with all fields unset 521 + pub fn new() -> Self { 522 + ThreadgateBuilder { 523 + _phantom_state: ::core::marker::PhantomData, 524 + __unsafe_private_named: (None, None, None, None), 525 + _phantom: ::core::marker::PhantomData, 526 + } 527 + } 528 + } 529 + 530 + impl<'a, S: threadgate_state::State> ThreadgateBuilder<'a, S> { 531 + /// Set the `allow` field (optional) 532 + pub fn allow( 533 + mut self, 534 + value: impl Into<Option<Vec<ThreadgateAllowItem<'a>>>>, 535 + ) -> Self { 536 + self.__unsafe_private_named.0 = value.into(); 537 + self 538 + } 539 + /// Set the `allow` field to an Option value (optional) 540 + pub fn maybe_allow(mut self, value: Option<Vec<ThreadgateAllowItem<'a>>>) -> Self { 541 + self.__unsafe_private_named.0 = value; 542 + self 543 + } 544 + } 545 + 546 + impl<'a, S> ThreadgateBuilder<'a, S> 547 + where 548 + S: threadgate_state::State, 549 + S::CreatedAt: threadgate_state::IsUnset, 550 + { 551 + /// Set the `createdAt` field (required) 552 + pub fn created_at( 553 + mut self, 554 + value: impl Into<jacquard_common::types::string::Datetime>, 555 + ) -> ThreadgateBuilder<'a, threadgate_state::SetCreatedAt<S>> { 556 + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 557 + ThreadgateBuilder { 558 + _phantom_state: ::core::marker::PhantomData, 559 + __unsafe_private_named: self.__unsafe_private_named, 560 + _phantom: ::core::marker::PhantomData, 561 + } 562 + } 563 + } 564 + 565 + impl<'a, S: threadgate_state::State> ThreadgateBuilder<'a, S> { 566 + /// Set the `hiddenReplies` field (optional) 567 + pub fn hidden_replies( 568 + mut self, 569 + value: impl Into<Option<Vec<jacquard_common::types::string::AtUri<'a>>>>, 570 + ) -> Self { 571 + self.__unsafe_private_named.2 = value.into(); 572 + self 573 + } 574 + /// Set the `hiddenReplies` field to an Option value (optional) 575 + pub fn maybe_hidden_replies( 576 + mut self, 577 + value: Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 578 + ) -> Self { 579 + self.__unsafe_private_named.2 = value; 580 + self 581 + } 582 + } 583 + 584 + impl<'a, S> ThreadgateBuilder<'a, S> 585 + where 586 + S: threadgate_state::State, 587 + S::Post: threadgate_state::IsUnset, 588 + { 589 + /// Set the `post` field (required) 590 + pub fn post( 591 + mut self, 592 + value: impl Into<jacquard_common::types::string::AtUri<'a>>, 593 + ) -> ThreadgateBuilder<'a, threadgate_state::SetPost<S>> { 594 + self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); 595 + ThreadgateBuilder { 596 + _phantom_state: ::core::marker::PhantomData, 597 + __unsafe_private_named: self.__unsafe_private_named, 598 + _phantom: ::core::marker::PhantomData, 599 + } 600 + } 601 + } 602 + 603 + impl<'a, S> ThreadgateBuilder<'a, S> 604 + where 605 + S: threadgate_state::State, 606 + S::Post: threadgate_state::IsSet, 607 + S::CreatedAt: threadgate_state::IsSet, 608 + { 609 + /// Build the final struct 610 + pub fn build(self) -> Threadgate<'a> { 611 + Threadgate { 612 + allow: self.__unsafe_private_named.0, 613 + created_at: self.__unsafe_private_named.1.unwrap(), 614 + hidden_replies: self.__unsafe_private_named.2, 615 + post: self.__unsafe_private_named.3.unwrap(), 616 + extra_data: Default::default(), 617 + } 618 + } 619 + /// Build the final struct with custom extra_data 620 + pub fn build_with_data( 621 + self, 622 + extra_data: std::collections::BTreeMap< 623 + jacquard_common::smol_str::SmolStr, 624 + jacquard_common::types::value::Data<'a>, 625 + >, 626 + ) -> Threadgate<'a> { 627 + Threadgate { 628 + allow: self.__unsafe_private_named.0, 629 + created_at: self.__unsafe_private_named.1.unwrap(), 630 + hidden_replies: self.__unsafe_private_named.2, 631 + post: self.__unsafe_private_named.3.unwrap(), 632 + extra_data: Some(extra_data), 633 + } 634 + } 635 + } 636 + 637 + impl<'a> Threadgate<'a> { 638 + pub fn uri( 639 + uri: impl Into<jacquard_common::CowStr<'a>>, 640 + ) -> Result< 641 + jacquard_common::types::uri::RecordUri<'a, ThreadgateRecord>, 642 + jacquard_common::types::uri::UriError, 643 + > { 644 + jacquard_common::types::uri::RecordUri::try_from_uri( 645 + jacquard_common::types::string::AtUri::new_cow(uri.into())?, 646 + ) 647 + } 648 + } 649 + 84 650 #[jacquard_derive::open_union] 85 651 #[derive( 86 652 serde::Serialize, ··· 152 718 type Record = ThreadgateRecord; 153 719 } 154 720 721 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Threadgate<'a> { 722 + fn nsid() -> &'static str { 723 + "app.bsky.feed.threadgate" 724 + } 725 + fn def_name() -> &'static str { 726 + "main" 727 + } 728 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 729 + lexicon_doc_app_bsky_feed_threadgate() 730 + } 731 + fn validate( 732 + &self, 733 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 734 + if let Some(ref value) = self.allow { 735 + #[allow(unused_comparisons)] 736 + if value.len() > 5usize { 737 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 738 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 739 + "allow", 740 + ), 741 + max: 5usize, 742 + actual: value.len(), 743 + }); 744 + } 745 + } 746 + if let Some(ref value) = self.hidden_replies { 747 + #[allow(unused_comparisons)] 748 + if value.len() > 300usize { 749 + return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 750 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 751 + "hidden_replies", 752 + ), 753 + max: 300usize, 754 + actual: value.len(), 755 + }); 756 + } 757 + } 758 + Ok(()) 759 + } 760 + } 761 + 155 762 /// Allow replies from actors mentioned in your post. 156 763 #[jacquard_derive::lexicon] 157 764 #[derive( ··· 165 772 Default 166 773 )] 167 774 #[serde(rename_all = "camelCase")] 168 - pub struct MentionRule<'a> {} 775 + pub struct MentionRule<'a> {} 776 + impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MentionRule<'a> { 777 + fn nsid() -> &'static str { 778 + "app.bsky.feed.threadgate" 779 + } 780 + fn def_name() -> &'static str { 781 + "mentionRule" 782 + } 783 + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 784 + lexicon_doc_app_bsky_feed_threadgate() 785 + } 786 + fn validate( 787 + &self, 788 + ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 789 + Ok(()) 790 + } 791 + }
+45
lexicon_types_crate/src/builder_types.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // This file was automatically generated from Lexicon schemas. 4 + // Any manual changes will be overwritten on the next regeneration. 5 + 6 + use bon::__::rustversion; 7 + 8 + /// Marker type indicating a builder field has been set 9 + pub struct Set<T>(pub T); 10 + impl<T> Set<T> { 11 + /// Extract the inner value 12 + #[inline] 13 + pub fn into_inner(self) -> T { 14 + self.0 15 + } 16 + } 17 + 18 + /// Marker type indicating a builder field has not been set 19 + pub struct Unset; 20 + /// Trait indicating a builder field is set (has a value) 21 + #[rustversion::attr( 22 + since(1.78.0), 23 + diagnostic::on_unimplemented( 24 + message = "the field `{Self}` was not set, but this method requires it to be set", 25 + label = "the field `{Self}` was not set" 26 + ) 27 + )] 28 + pub trait IsSet: private::Sealed {} 29 + /// Trait indicating a builder field is unset (no value yet) 30 + #[rustversion::attr( 31 + since(1.78.0), 32 + diagnostic::on_unimplemented( 33 + message = "the field `{Self}` was already set, but this method requires it to be unset", 34 + label = "the field `{Self}` was already set" 35 + ) 36 + )] 37 + pub trait IsUnset: private::Sealed {} 38 + impl<T> IsSet for Set<T> {} 39 + impl IsUnset for Unset {} 40 + mod private { 41 + /// Sealed trait to prevent external implementations 42 + pub trait Sealed {} 43 + impl<T> Sealed for super::Set<T> {} 44 + impl Sealed for super::Unset {} 45 + }
+154 -14
lexicon_types_crate/src/com_atproto/sync/get_blob.rs
··· 12 12 Clone, 13 13 PartialEq, 14 14 Eq, 15 - bon::Builder, 16 15 jacquard_derive::IntoStatic 17 16 )] 18 - #[builder(start_fn = new)] 19 17 #[serde(rename_all = "camelCase")] 20 18 pub struct GetBlob<'a> { 21 19 #[serde(borrow)] ··· 24 22 pub did: jacquard_common::types::string::Did<'a>, 25 23 } 26 24 27 - #[jacquard_derive::lexicon] 25 + pub mod get_blob_state { 26 + 27 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 28 + #[allow(unused)] 29 + use ::core::marker::PhantomData; 30 + mod sealed { 31 + pub trait Sealed {} 32 + } 33 + /// State trait tracking which required fields have been set 34 + pub trait State: sealed::Sealed { 35 + type Did; 36 + type Cid; 37 + } 38 + /// Empty state - all required fields are unset 39 + pub struct Empty(()); 40 + impl sealed::Sealed for Empty {} 41 + impl State for Empty { 42 + type Did = Unset; 43 + type Cid = Unset; 44 + } 45 + ///State transition - sets the `did` field to Set 46 + pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 47 + impl<S: State> sealed::Sealed for SetDid<S> {} 48 + impl<S: State> State for SetDid<S> { 49 + type Did = Set<members::did>; 50 + type Cid = S::Cid; 51 + } 52 + ///State transition - sets the `cid` field to Set 53 + pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 54 + impl<S: State> sealed::Sealed for SetCid<S> {} 55 + impl<S: State> State for SetCid<S> { 56 + type Did = S::Did; 57 + type Cid = Set<members::cid>; 58 + } 59 + /// Marker types for field names 60 + #[allow(non_camel_case_types)] 61 + pub mod members { 62 + ///Marker type for the `did` field 63 + pub struct did(()); 64 + ///Marker type for the `cid` field 65 + pub struct cid(()); 66 + } 67 + } 68 + 69 + /// Builder for constructing an instance of this type 70 + pub struct GetBlobBuilder<'a, S: get_blob_state::State> { 71 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 72 + __unsafe_private_named: ( 73 + ::core::option::Option<jacquard_common::types::string::Cid<'a>>, 74 + ::core::option::Option<jacquard_common::types::string::Did<'a>>, 75 + ), 76 + _phantom: ::core::marker::PhantomData<&'a ()>, 77 + } 78 + 79 + impl<'a> GetBlob<'a> { 80 + /// Create a new builder for this type 81 + pub fn new() -> GetBlobBuilder<'a, get_blob_state::Empty> { 82 + GetBlobBuilder::new() 83 + } 84 + } 85 + 86 + impl<'a> GetBlobBuilder<'a, get_blob_state::Empty> { 87 + /// Create a new builder with all fields unset 88 + pub fn new() -> Self { 89 + GetBlobBuilder { 90 + _phantom_state: ::core::marker::PhantomData, 91 + __unsafe_private_named: (None, None), 92 + _phantom: ::core::marker::PhantomData, 93 + } 94 + } 95 + } 96 + 97 + impl<'a, S> GetBlobBuilder<'a, S> 98 + where 99 + S: get_blob_state::State, 100 + S::Cid: get_blob_state::IsUnset, 101 + { 102 + /// Set the `cid` field (required) 103 + pub fn cid( 104 + mut self, 105 + value: impl Into<jacquard_common::types::string::Cid<'a>>, 106 + ) -> GetBlobBuilder<'a, get_blob_state::SetCid<S>> { 107 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 108 + GetBlobBuilder { 109 + _phantom_state: ::core::marker::PhantomData, 110 + __unsafe_private_named: self.__unsafe_private_named, 111 + _phantom: ::core::marker::PhantomData, 112 + } 113 + } 114 + } 115 + 116 + impl<'a, S> GetBlobBuilder<'a, S> 117 + where 118 + S: get_blob_state::State, 119 + S::Did: get_blob_state::IsUnset, 120 + { 121 + /// Set the `did` field (required) 122 + pub fn did( 123 + mut self, 124 + value: impl Into<jacquard_common::types::string::Did<'a>>, 125 + ) -> GetBlobBuilder<'a, get_blob_state::SetDid<S>> { 126 + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 127 + GetBlobBuilder { 128 + _phantom_state: ::core::marker::PhantomData, 129 + __unsafe_private_named: self.__unsafe_private_named, 130 + _phantom: ::core::marker::PhantomData, 131 + } 132 + } 133 + } 134 + 135 + impl<'a, S> GetBlobBuilder<'a, S> 136 + where 137 + S: get_blob_state::State, 138 + S::Did: get_blob_state::IsSet, 139 + S::Cid: get_blob_state::IsSet, 140 + { 141 + /// Build the final struct 142 + pub fn build(self) -> GetBlob<'a> { 143 + GetBlob { 144 + cid: self.__unsafe_private_named.0.unwrap(), 145 + did: self.__unsafe_private_named.1.unwrap(), 146 + } 147 + } 148 + } 149 + 28 150 #[derive( 29 151 serde::Serialize, 30 152 serde::Deserialize, ··· 35 157 jacquard_derive::IntoStatic 36 158 )] 37 159 #[serde(rename_all = "camelCase")] 38 - pub struct GetBlobOutput<'a> {} 160 + pub struct GetBlobOutput { 161 + pub body: bytes::Bytes, 162 + } 163 + 39 164 #[jacquard_derive::open_union] 40 165 #[derive( 41 166 serde::Serialize, ··· 52 177 #[serde(bound(deserialize = "'de: 'a"))] 53 178 pub enum GetBlobError<'a> { 54 179 #[serde(rename = "BlobNotFound")] 55 - BlobNotFound(std::option::Option<String>), 180 + BlobNotFound(std::option::Option<jacquard_common::CowStr<'a>>), 56 181 #[serde(rename = "RepoNotFound")] 57 - RepoNotFound(std::option::Option<String>), 182 + RepoNotFound(std::option::Option<jacquard_common::CowStr<'a>>), 58 183 #[serde(rename = "RepoTakendown")] 59 - RepoTakendown(std::option::Option<String>), 184 + RepoTakendown(std::option::Option<jacquard_common::CowStr<'a>>), 60 185 #[serde(rename = "RepoSuspended")] 61 - RepoSuspended(std::option::Option<String>), 186 + RepoSuspended(std::option::Option<jacquard_common::CowStr<'a>>), 62 187 #[serde(rename = "RepoDeactivated")] 63 - RepoDeactivated(std::option::Option<String>), 188 + RepoDeactivated(std::option::Option<jacquard_common::CowStr<'a>>), 64 189 } 65 190 66 - impl std::fmt::Display for GetBlobError<'_> { 67 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 191 + impl core::fmt::Display for GetBlobError<'_> { 192 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 68 193 match self { 69 194 Self::BlobNotFound(msg) => { 70 195 write!(f, "BlobNotFound")?; ··· 106 231 } 107 232 } 108 233 109 - ///Response type for 234 + /// Response type for 110 235 ///com.atproto.sync.getBlob 111 236 pub struct GetBlobResponse; 112 237 impl jacquard_common::xrpc::XrpcResp for GetBlobResponse { 113 238 const NSID: &'static str = "com.atproto.sync.getBlob"; 114 239 const ENCODING: &'static str = "*/*"; 115 - type Output<'de> = GetBlobOutput<'de>; 240 + type Output<'de> = GetBlobOutput; 116 241 type Err<'de> = GetBlobError<'de>; 242 + fn encode_output( 243 + output: &Self::Output<'_>, 244 + ) -> Result<Vec<u8>, jacquard_common::xrpc::EncodeError> { 245 + Ok(output.body.to_vec()) 246 + } 247 + fn decode_output<'de>( 248 + body: &'de [u8], 249 + ) -> Result<Self::Output<'de>, jacquard_common::error::DecodeError> 250 + where 251 + Self::Output<'de>: serde::Deserialize<'de>, 252 + { 253 + Ok(GetBlobOutput { 254 + body: bytes::Bytes::copy_from_slice(body), 255 + }) 256 + } 117 257 } 118 258 119 259 impl<'a> jacquard_common::xrpc::XrpcRequest for GetBlob<'a> { ··· 122 262 type Response = GetBlobResponse; 123 263 } 124 264 125 - ///Endpoint type for 265 + /// Endpoint type for 126 266 ///com.atproto.sync.getBlob 127 267 pub struct GetBlobRequest; 128 268 impl jacquard_common::xrpc::XrpcEndpoint for GetBlobRequest {
+140 -13
lexicon_types_crate/src/com_atproto/sync/get_repo.rs
··· 12 12 Clone, 13 13 PartialEq, 14 14 Eq, 15 - bon::Builder, 16 15 jacquard_derive::IntoStatic 17 16 )] 18 - #[builder(start_fn = new)] 19 17 #[serde(rename_all = "camelCase")] 20 18 pub struct GetRepo<'a> { 21 19 #[serde(borrow)] ··· 24 22 pub since: std::option::Option<jacquard_common::types::string::Tid>, 25 23 } 26 24 27 - #[jacquard_derive::lexicon] 25 + pub mod get_repo_state { 26 + 27 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 28 + #[allow(unused)] 29 + use ::core::marker::PhantomData; 30 + mod sealed { 31 + pub trait Sealed {} 32 + } 33 + /// State trait tracking which required fields have been set 34 + pub trait State: sealed::Sealed { 35 + type Did; 36 + } 37 + /// Empty state - all required fields are unset 38 + pub struct Empty(()); 39 + impl sealed::Sealed for Empty {} 40 + impl State for Empty { 41 + type Did = Unset; 42 + } 43 + ///State transition - sets the `did` field to Set 44 + pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 45 + impl<S: State> sealed::Sealed for SetDid<S> {} 46 + impl<S: State> State for SetDid<S> { 47 + type Did = Set<members::did>; 48 + } 49 + /// Marker types for field names 50 + #[allow(non_camel_case_types)] 51 + pub mod members { 52 + ///Marker type for the `did` field 53 + pub struct did(()); 54 + } 55 + } 56 + 57 + /// Builder for constructing an instance of this type 58 + pub struct GetRepoBuilder<'a, S: get_repo_state::State> { 59 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 60 + __unsafe_private_named: ( 61 + ::core::option::Option<jacquard_common::types::string::Did<'a>>, 62 + ::core::option::Option<jacquard_common::types::string::Tid>, 63 + ), 64 + _phantom: ::core::marker::PhantomData<&'a ()>, 65 + } 66 + 67 + impl<'a> GetRepo<'a> { 68 + /// Create a new builder for this type 69 + pub fn new() -> GetRepoBuilder<'a, get_repo_state::Empty> { 70 + GetRepoBuilder::new() 71 + } 72 + } 73 + 74 + impl<'a> GetRepoBuilder<'a, get_repo_state::Empty> { 75 + /// Create a new builder with all fields unset 76 + pub fn new() -> Self { 77 + GetRepoBuilder { 78 + _phantom_state: ::core::marker::PhantomData, 79 + __unsafe_private_named: (None, None), 80 + _phantom: ::core::marker::PhantomData, 81 + } 82 + } 83 + } 84 + 85 + impl<'a, S> GetRepoBuilder<'a, S> 86 + where 87 + S: get_repo_state::State, 88 + S::Did: get_repo_state::IsUnset, 89 + { 90 + /// Set the `did` field (required) 91 + pub fn did( 92 + mut self, 93 + value: impl Into<jacquard_common::types::string::Did<'a>>, 94 + ) -> GetRepoBuilder<'a, get_repo_state::SetDid<S>> { 95 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 96 + GetRepoBuilder { 97 + _phantom_state: ::core::marker::PhantomData, 98 + __unsafe_private_named: self.__unsafe_private_named, 99 + _phantom: ::core::marker::PhantomData, 100 + } 101 + } 102 + } 103 + 104 + impl<'a, S: get_repo_state::State> GetRepoBuilder<'a, S> { 105 + /// Set the `since` field (optional) 106 + pub fn since( 107 + mut self, 108 + value: impl Into<Option<jacquard_common::types::string::Tid>>, 109 + ) -> Self { 110 + self.__unsafe_private_named.1 = value.into(); 111 + self 112 + } 113 + /// Set the `since` field to an Option value (optional) 114 + pub fn maybe_since( 115 + mut self, 116 + value: Option<jacquard_common::types::string::Tid>, 117 + ) -> Self { 118 + self.__unsafe_private_named.1 = value; 119 + self 120 + } 121 + } 122 + 123 + impl<'a, S> GetRepoBuilder<'a, S> 124 + where 125 + S: get_repo_state::State, 126 + S::Did: get_repo_state::IsSet, 127 + { 128 + /// Build the final struct 129 + pub fn build(self) -> GetRepo<'a> { 130 + GetRepo { 131 + did: self.__unsafe_private_named.0.unwrap(), 132 + since: self.__unsafe_private_named.1, 133 + } 134 + } 135 + } 136 + 28 137 #[derive( 29 138 serde::Serialize, 30 139 serde::Deserialize, ··· 35 144 jacquard_derive::IntoStatic 36 145 )] 37 146 #[serde(rename_all = "camelCase")] 38 - pub struct GetRepoOutput<'a> {} 147 + pub struct GetRepoOutput { 148 + pub body: bytes::Bytes, 149 + } 150 + 39 151 #[jacquard_derive::open_union] 40 152 #[derive( 41 153 serde::Serialize, ··· 52 164 #[serde(bound(deserialize = "'de: 'a"))] 53 165 pub enum GetRepoError<'a> { 54 166 #[serde(rename = "RepoNotFound")] 55 - RepoNotFound(std::option::Option<String>), 167 + RepoNotFound(std::option::Option<jacquard_common::CowStr<'a>>), 56 168 #[serde(rename = "RepoTakendown")] 57 - RepoTakendown(std::option::Option<String>), 169 + RepoTakendown(std::option::Option<jacquard_common::CowStr<'a>>), 58 170 #[serde(rename = "RepoSuspended")] 59 - RepoSuspended(std::option::Option<String>), 171 + RepoSuspended(std::option::Option<jacquard_common::CowStr<'a>>), 60 172 #[serde(rename = "RepoDeactivated")] 61 - RepoDeactivated(std::option::Option<String>), 173 + RepoDeactivated(std::option::Option<jacquard_common::CowStr<'a>>), 62 174 } 63 175 64 - impl std::fmt::Display for GetRepoError<'_> { 65 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 176 + impl core::fmt::Display for GetRepoError<'_> { 177 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 66 178 match self { 67 179 Self::RepoNotFound(msg) => { 68 180 write!(f, "RepoNotFound")?; ··· 97 209 } 98 210 } 99 211 100 - ///Response type for 212 + /// Response type for 101 213 ///com.atproto.sync.getRepo 102 214 pub struct GetRepoResponse; 103 215 impl jacquard_common::xrpc::XrpcResp for GetRepoResponse { 104 216 const NSID: &'static str = "com.atproto.sync.getRepo"; 105 217 const ENCODING: &'static str = "application/vnd.ipld.car"; 106 - type Output<'de> = GetRepoOutput<'de>; 218 + type Output<'de> = GetRepoOutput; 107 219 type Err<'de> = GetRepoError<'de>; 220 + fn encode_output( 221 + output: &Self::Output<'_>, 222 + ) -> Result<Vec<u8>, jacquard_common::xrpc::EncodeError> { 223 + Ok(output.body.to_vec()) 224 + } 225 + fn decode_output<'de>( 226 + body: &'de [u8], 227 + ) -> Result<Self::Output<'de>, jacquard_common::error::DecodeError> 228 + where 229 + Self::Output<'de>: serde::Deserialize<'de>, 230 + { 231 + Ok(GetRepoOutput { 232 + body: bytes::Bytes::copy_from_slice(body), 233 + }) 234 + } 108 235 } 109 236 110 237 impl<'a> jacquard_common::xrpc::XrpcRequest for GetRepo<'a> { ··· 113 240 type Response = GetRepoResponse; 114 241 } 115 242 116 - ///Endpoint type for 243 + /// Endpoint type for 117 244 ///com.atproto.sync.getRepo 118 245 pub struct GetRepoRequest; 119 246 impl jacquard_common::xrpc::XrpcEndpoint for GetRepoRequest {
+280
lexicon_types_crate/src/com_atproto/sync/list_blobs.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: com.atproto.sync.listBlobs 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[derive( 9 + serde::Serialize, 10 + serde::Deserialize, 11 + Debug, 12 + Clone, 13 + PartialEq, 14 + Eq, 15 + jacquard_derive::IntoStatic 16 + )] 17 + #[serde(rename_all = "camelCase")] 18 + pub struct ListBlobs<'a> { 19 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 20 + #[serde(borrow)] 21 + pub cursor: std::option::Option<jacquard_common::CowStr<'a>>, 22 + #[serde(borrow)] 23 + pub did: jacquard_common::types::string::Did<'a>, 24 + ///(default: 500, min: 1, max: 1000) 25 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 26 + pub limit: std::option::Option<i64>, 27 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 28 + pub since: std::option::Option<jacquard_common::types::string::Tid>, 29 + } 30 + 31 + pub mod list_blobs_state { 32 + 33 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 34 + #[allow(unused)] 35 + use ::core::marker::PhantomData; 36 + mod sealed { 37 + pub trait Sealed {} 38 + } 39 + /// State trait tracking which required fields have been set 40 + pub trait State: sealed::Sealed { 41 + type Did; 42 + } 43 + /// Empty state - all required fields are unset 44 + pub struct Empty(()); 45 + impl sealed::Sealed for Empty {} 46 + impl State for Empty { 47 + type Did = Unset; 48 + } 49 + ///State transition - sets the `did` field to Set 50 + pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 51 + impl<S: State> sealed::Sealed for SetDid<S> {} 52 + impl<S: State> State for SetDid<S> { 53 + type Did = Set<members::did>; 54 + } 55 + /// Marker types for field names 56 + #[allow(non_camel_case_types)] 57 + pub mod members { 58 + ///Marker type for the `did` field 59 + pub struct did(()); 60 + } 61 + } 62 + 63 + /// Builder for constructing an instance of this type 64 + pub struct ListBlobsBuilder<'a, S: list_blobs_state::State> { 65 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 66 + __unsafe_private_named: ( 67 + ::core::option::Option<jacquard_common::CowStr<'a>>, 68 + ::core::option::Option<jacquard_common::types::string::Did<'a>>, 69 + ::core::option::Option<i64>, 70 + ::core::option::Option<jacquard_common::types::string::Tid>, 71 + ), 72 + _phantom: ::core::marker::PhantomData<&'a ()>, 73 + } 74 + 75 + impl<'a> ListBlobs<'a> { 76 + /// Create a new builder for this type 77 + pub fn new() -> ListBlobsBuilder<'a, list_blobs_state::Empty> { 78 + ListBlobsBuilder::new() 79 + } 80 + } 81 + 82 + impl<'a> ListBlobsBuilder<'a, list_blobs_state::Empty> { 83 + /// Create a new builder with all fields unset 84 + pub fn new() -> Self { 85 + ListBlobsBuilder { 86 + _phantom_state: ::core::marker::PhantomData, 87 + __unsafe_private_named: (None, None, None, None), 88 + _phantom: ::core::marker::PhantomData, 89 + } 90 + } 91 + } 92 + 93 + impl<'a, S: list_blobs_state::State> ListBlobsBuilder<'a, S> { 94 + /// Set the `cursor` field (optional) 95 + pub fn cursor( 96 + mut self, 97 + value: impl Into<Option<jacquard_common::CowStr<'a>>>, 98 + ) -> Self { 99 + self.__unsafe_private_named.0 = value.into(); 100 + self 101 + } 102 + /// Set the `cursor` field to an Option value (optional) 103 + pub fn maybe_cursor(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self { 104 + self.__unsafe_private_named.0 = value; 105 + self 106 + } 107 + } 108 + 109 + impl<'a, S> ListBlobsBuilder<'a, S> 110 + where 111 + S: list_blobs_state::State, 112 + S::Did: list_blobs_state::IsUnset, 113 + { 114 + /// Set the `did` field (required) 115 + pub fn did( 116 + mut self, 117 + value: impl Into<jacquard_common::types::string::Did<'a>>, 118 + ) -> ListBlobsBuilder<'a, list_blobs_state::SetDid<S>> { 119 + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 120 + ListBlobsBuilder { 121 + _phantom_state: ::core::marker::PhantomData, 122 + __unsafe_private_named: self.__unsafe_private_named, 123 + _phantom: ::core::marker::PhantomData, 124 + } 125 + } 126 + } 127 + 128 + impl<'a, S: list_blobs_state::State> ListBlobsBuilder<'a, S> { 129 + /// Set the `limit` field (optional) 130 + pub fn limit(mut self, value: impl Into<Option<i64>>) -> Self { 131 + self.__unsafe_private_named.2 = value.into(); 132 + self 133 + } 134 + /// Set the `limit` field to an Option value (optional) 135 + pub fn maybe_limit(mut self, value: Option<i64>) -> Self { 136 + self.__unsafe_private_named.2 = value; 137 + self 138 + } 139 + } 140 + 141 + impl<'a, S: list_blobs_state::State> ListBlobsBuilder<'a, S> { 142 + /// Set the `since` field (optional) 143 + pub fn since( 144 + mut self, 145 + value: impl Into<Option<jacquard_common::types::string::Tid>>, 146 + ) -> Self { 147 + self.__unsafe_private_named.3 = value.into(); 148 + self 149 + } 150 + /// Set the `since` field to an Option value (optional) 151 + pub fn maybe_since( 152 + mut self, 153 + value: Option<jacquard_common::types::string::Tid>, 154 + ) -> Self { 155 + self.__unsafe_private_named.3 = value; 156 + self 157 + } 158 + } 159 + 160 + impl<'a, S> ListBlobsBuilder<'a, S> 161 + where 162 + S: list_blobs_state::State, 163 + S::Did: list_blobs_state::IsSet, 164 + { 165 + /// Build the final struct 166 + pub fn build(self) -> ListBlobs<'a> { 167 + ListBlobs { 168 + cursor: self.__unsafe_private_named.0, 169 + did: self.__unsafe_private_named.1.unwrap(), 170 + limit: self.__unsafe_private_named.2, 171 + since: self.__unsafe_private_named.3, 172 + } 173 + } 174 + } 175 + 176 + #[jacquard_derive::lexicon] 177 + #[derive( 178 + serde::Serialize, 179 + serde::Deserialize, 180 + Debug, 181 + Clone, 182 + PartialEq, 183 + Eq, 184 + jacquard_derive::IntoStatic 185 + )] 186 + #[serde(rename_all = "camelCase")] 187 + pub struct ListBlobsOutput<'a> { 188 + #[serde(borrow)] 189 + pub cids: Vec<jacquard_common::types::string::Cid<'a>>, 190 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 191 + #[serde(borrow)] 192 + pub cursor: std::option::Option<jacquard_common::CowStr<'a>>, 193 + } 194 + 195 + #[jacquard_derive::open_union] 196 + #[derive( 197 + serde::Serialize, 198 + serde::Deserialize, 199 + Debug, 200 + Clone, 201 + PartialEq, 202 + Eq, 203 + thiserror::Error, 204 + miette::Diagnostic, 205 + jacquard_derive::IntoStatic 206 + )] 207 + #[serde(tag = "error", content = "message")] 208 + #[serde(bound(deserialize = "'de: 'a"))] 209 + pub enum ListBlobsError<'a> { 210 + #[serde(rename = "RepoNotFound")] 211 + RepoNotFound(std::option::Option<jacquard_common::CowStr<'a>>), 212 + #[serde(rename = "RepoTakendown")] 213 + RepoTakendown(std::option::Option<jacquard_common::CowStr<'a>>), 214 + #[serde(rename = "RepoSuspended")] 215 + RepoSuspended(std::option::Option<jacquard_common::CowStr<'a>>), 216 + #[serde(rename = "RepoDeactivated")] 217 + RepoDeactivated(std::option::Option<jacquard_common::CowStr<'a>>), 218 + } 219 + 220 + impl core::fmt::Display for ListBlobsError<'_> { 221 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 222 + match self { 223 + Self::RepoNotFound(msg) => { 224 + write!(f, "RepoNotFound")?; 225 + if let Some(msg) = msg { 226 + write!(f, ": {}", msg)?; 227 + } 228 + Ok(()) 229 + } 230 + Self::RepoTakendown(msg) => { 231 + write!(f, "RepoTakendown")?; 232 + if let Some(msg) = msg { 233 + write!(f, ": {}", msg)?; 234 + } 235 + Ok(()) 236 + } 237 + Self::RepoSuspended(msg) => { 238 + write!(f, "RepoSuspended")?; 239 + if let Some(msg) = msg { 240 + write!(f, ": {}", msg)?; 241 + } 242 + Ok(()) 243 + } 244 + Self::RepoDeactivated(msg) => { 245 + write!(f, "RepoDeactivated")?; 246 + if let Some(msg) = msg { 247 + write!(f, ": {}", msg)?; 248 + } 249 + Ok(()) 250 + } 251 + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), 252 + } 253 + } 254 + } 255 + 256 + /// Response type for 257 + ///com.atproto.sync.listBlobs 258 + pub struct ListBlobsResponse; 259 + impl jacquard_common::xrpc::XrpcResp for ListBlobsResponse { 260 + const NSID: &'static str = "com.atproto.sync.listBlobs"; 261 + const ENCODING: &'static str = "application/json"; 262 + type Output<'de> = ListBlobsOutput<'de>; 263 + type Err<'de> = ListBlobsError<'de>; 264 + } 265 + 266 + impl<'a> jacquard_common::xrpc::XrpcRequest for ListBlobs<'a> { 267 + const NSID: &'static str = "com.atproto.sync.listBlobs"; 268 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 269 + type Response = ListBlobsResponse; 270 + } 271 + 272 + /// Endpoint type for 273 + ///com.atproto.sync.listBlobs 274 + pub struct ListBlobsRequest; 275 + impl jacquard_common::xrpc::XrpcEndpoint for ListBlobsRequest { 276 + const PATH: &'static str = "/xrpc/com.atproto.sync.listBlobs"; 277 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 278 + type Request<'de> = ListBlobs<'de>; 279 + type Response = ListBlobsResponse; 280 + }
+2 -1
lexicon_types_crate/src/com_atproto/sync.rs
··· 4 4 // Any manual changes will be overwritten on the next regeneration. 5 5 6 6 pub mod get_blob; 7 - pub mod get_repo; 7 + pub mod get_repo; 8 + pub mod list_blobs;
+7 -7
lexicon_types_crate/src/com_pdsmoover/admin/remove_pds.rs
··· 39 39 #[serde(bound(deserialize = "'de: 'a"))] 40 40 pub enum RemovePdsError<'a> { 41 41 #[serde(rename = "NotFound")] 42 - NotFound(std::option::Option<String>), 42 + NotFound(std::option::Option<jacquard_common::CowStr<'a>>), 43 43 #[serde(rename = "NotAuthorized")] 44 - NotAuthorized(std::option::Option<String>), 44 + NotAuthorized(std::option::Option<jacquard_common::CowStr<'a>>), 45 45 #[serde(rename = "NotAValidPDS")] 46 - NotAValidPds(std::option::Option<String>), 46 + NotAValidPds(std::option::Option<jacquard_common::CowStr<'a>>), 47 47 } 48 48 49 - impl std::fmt::Display for RemovePdsError<'_> { 50 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 49 + impl core::fmt::Display for RemovePdsError<'_> { 50 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 51 51 match self { 52 52 Self::NotFound(msg) => { 53 53 write!(f, "NotFound")?; ··· 75 75 } 76 76 } 77 77 78 - ///Response type for 78 + /// Response type for 79 79 ///com.pdsmoover.admin.removePds 80 80 pub struct RemovePdsResponse; 81 81 impl jacquard_common::xrpc::XrpcResp for RemovePdsResponse { ··· 93 93 type Response = RemovePdsResponse; 94 94 } 95 95 96 - ///Endpoint type for 96 + /// Endpoint type for 97 97 ///com.pdsmoover.admin.removePds 98 98 pub struct RemovePdsRequest; 99 99 impl jacquard_common::xrpc::XrpcEndpoint for RemovePdsRequest {
+111 -15
lexicon_types_crate/src/com_pdsmoover/admin/remove_repo.rs
··· 13 13 Clone, 14 14 PartialEq, 15 15 Eq, 16 - bon::Builder, 17 16 jacquard_derive::IntoStatic 18 17 )] 19 18 #[serde(rename_all = "camelCase")] 20 - #[builder(start_fn = new)] 21 19 pub struct RemoveRepo<'a> { 22 20 /// The did of the repo to remove 23 21 #[serde(borrow)] 24 22 pub did: jacquard_common::types::string::Did<'a>, 25 - #[serde(flatten)] 26 - #[serde(borrow)] 27 - #[builder(default)] 28 - pub extra_data: ::std::collections::BTreeMap< 29 - ::jacquard_common::smol_str::SmolStr, 30 - ::jacquard_common::types::value::Data<'a>, 31 - >, 23 + } 24 + 25 + pub mod remove_repo_state { 26 + 27 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 28 + #[allow(unused)] 29 + use ::core::marker::PhantomData; 30 + mod sealed { 31 + pub trait Sealed {} 32 + } 33 + /// State trait tracking which required fields have been set 34 + pub trait State: sealed::Sealed { 35 + type Did; 36 + } 37 + /// Empty state - all required fields are unset 38 + pub struct Empty(()); 39 + impl sealed::Sealed for Empty {} 40 + impl State for Empty { 41 + type Did = Unset; 42 + } 43 + ///State transition - sets the `did` field to Set 44 + pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 45 + impl<S: State> sealed::Sealed for SetDid<S> {} 46 + impl<S: State> State for SetDid<S> { 47 + type Did = Set<members::did>; 48 + } 49 + /// Marker types for field names 50 + #[allow(non_camel_case_types)] 51 + pub mod members { 52 + ///Marker type for the `did` field 53 + pub struct did(()); 54 + } 55 + } 56 + 57 + /// Builder for constructing an instance of this type 58 + pub struct RemoveRepoBuilder<'a, S: remove_repo_state::State> { 59 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 60 + __unsafe_private_named: ( 61 + ::core::option::Option<jacquard_common::types::string::Did<'a>>, 62 + ), 63 + _phantom: ::core::marker::PhantomData<&'a ()>, 64 + } 65 + 66 + impl<'a> RemoveRepo<'a> { 67 + /// Create a new builder for this type 68 + pub fn new() -> RemoveRepoBuilder<'a, remove_repo_state::Empty> { 69 + RemoveRepoBuilder::new() 70 + } 71 + } 72 + 73 + impl<'a> RemoveRepoBuilder<'a, remove_repo_state::Empty> { 74 + /// Create a new builder with all fields unset 75 + pub fn new() -> Self { 76 + RemoveRepoBuilder { 77 + _phantom_state: ::core::marker::PhantomData, 78 + __unsafe_private_named: (None,), 79 + _phantom: ::core::marker::PhantomData, 80 + } 81 + } 82 + } 83 + 84 + impl<'a, S> RemoveRepoBuilder<'a, S> 85 + where 86 + S: remove_repo_state::State, 87 + S::Did: remove_repo_state::IsUnset, 88 + { 89 + /// Set the `did` field (required) 90 + pub fn did( 91 + mut self, 92 + value: impl Into<jacquard_common::types::string::Did<'a>>, 93 + ) -> RemoveRepoBuilder<'a, remove_repo_state::SetDid<S>> { 94 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 95 + RemoveRepoBuilder { 96 + _phantom_state: ::core::marker::PhantomData, 97 + __unsafe_private_named: self.__unsafe_private_named, 98 + _phantom: ::core::marker::PhantomData, 99 + } 100 + } 101 + } 102 + 103 + impl<'a, S> RemoveRepoBuilder<'a, S> 104 + where 105 + S: remove_repo_state::State, 106 + S::Did: remove_repo_state::IsSet, 107 + { 108 + /// Build the final struct 109 + pub fn build(self) -> RemoveRepo<'a> { 110 + RemoveRepo { 111 + did: self.__unsafe_private_named.0.unwrap(), 112 + extra_data: Default::default(), 113 + } 114 + } 115 + /// Build the final struct with custom extra_data 116 + pub fn build_with_data( 117 + self, 118 + extra_data: std::collections::BTreeMap< 119 + jacquard_common::smol_str::SmolStr, 120 + jacquard_common::types::value::Data<'a>, 121 + >, 122 + ) -> RemoveRepo<'a> { 123 + RemoveRepo { 124 + did: self.__unsafe_private_named.0.unwrap(), 125 + extra_data: Some(extra_data), 126 + } 127 + } 32 128 } 33 129 34 130 #[jacquard_derive::open_union] ··· 47 143 #[serde(bound(deserialize = "'de: 'a"))] 48 144 pub enum RemoveRepoError<'a> { 49 145 #[serde(rename = "NotFound")] 50 - NotFound(std::option::Option<String>), 146 + NotFound(std::option::Option<jacquard_common::CowStr<'a>>), 51 147 #[serde(rename = "NotAuthorized")] 52 - NotAuthorized(std::option::Option<String>), 148 + NotAuthorized(std::option::Option<jacquard_common::CowStr<'a>>), 53 149 } 54 150 55 - impl std::fmt::Display for RemoveRepoError<'_> { 56 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 151 + impl core::fmt::Display for RemoveRepoError<'_> { 152 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 57 153 match self { 58 154 Self::NotFound(msg) => { 59 155 write!(f, "NotFound")?; ··· 74 170 } 75 171 } 76 172 77 - ///Response type for 173 + /// Response type for 78 174 ///com.pdsmoover.admin.removeRepo 79 175 pub struct RemoveRepoResponse; 80 176 impl jacquard_common::xrpc::XrpcResp for RemoveRepoResponse { ··· 92 188 type Response = RemoveRepoResponse; 93 189 } 94 190 95 - ///Endpoint type for 191 + /// Endpoint type for 96 192 ///com.pdsmoover.admin.removeRepo 97 193 pub struct RemoveRepoRequest; 98 194 impl jacquard_common::xrpc::XrpcEndpoint for RemoveRepoRequest {
+6 -6
lexicon_types_crate/src/com_pdsmoover/admin/request_instance_backup.rs
··· 21 21 #[serde(bound(deserialize = "'de: 'a"))] 22 22 pub enum RequestInstanceBackupError<'a> { 23 23 #[serde(rename = "NotFound")] 24 - NotFound(std::option::Option<String>), 24 + NotFound(std::option::Option<jacquard_common::CowStr<'a>>), 25 25 #[serde(rename = "NotAuthorized")] 26 - NotAuthorized(std::option::Option<String>), 26 + NotAuthorized(std::option::Option<jacquard_common::CowStr<'a>>), 27 27 } 28 28 29 - impl std::fmt::Display for RequestInstanceBackupError<'_> { 30 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 29 + impl core::fmt::Display for RequestInstanceBackupError<'_> { 30 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 31 31 match self { 32 32 Self::NotFound(msg) => { 33 33 write!(f, "NotFound")?; ··· 60 60 jacquard_derive::IntoStatic 61 61 )] 62 62 pub struct RequestInstanceBackup; 63 - ///Response type for 63 + /// Response type for 64 64 ///com.pdsmoover.admin.requestInstanceBackup 65 65 pub struct RequestInstanceBackupResponse; 66 66 impl jacquard_common::xrpc::XrpcResp for RequestInstanceBackupResponse { ··· 78 78 type Response = RequestInstanceBackupResponse; 79 79 } 80 80 81 - ///Endpoint type for 81 + /// Endpoint type for 82 82 ///com.pdsmoover.admin.requestInstanceBackup 83 83 pub struct RequestInstanceBackupRequest; 84 84 impl jacquard_common::xrpc::XrpcEndpoint for RequestInstanceBackupRequest {
+6 -6
lexicon_types_crate/src/com_pdsmoover/admin/request_pds_backup.rs
··· 39 39 #[serde(bound(deserialize = "'de: 'a"))] 40 40 pub enum RequestPdsBackupError<'a> { 41 41 #[serde(rename = "NotFound")] 42 - NotFound(std::option::Option<String>), 42 + NotFound(std::option::Option<jacquard_common::CowStr<'a>>), 43 43 #[serde(rename = "NotAuthorized")] 44 - NotAuthorized(std::option::Option<String>), 44 + NotAuthorized(std::option::Option<jacquard_common::CowStr<'a>>), 45 45 } 46 46 47 - impl std::fmt::Display for RequestPdsBackupError<'_> { 48 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 47 + impl core::fmt::Display for RequestPdsBackupError<'_> { 48 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 49 49 match self { 50 50 Self::NotFound(msg) => { 51 51 write!(f, "NotFound")?; ··· 66 66 } 67 67 } 68 68 69 - ///Response type for 69 + /// Response type for 70 70 ///com.pdsmoover.admin.requestPdsBackup 71 71 pub struct RequestPdsBackupResponse; 72 72 impl jacquard_common::xrpc::XrpcResp for RequestPdsBackupResponse { ··· 84 84 type Response = RequestPdsBackupResponse; 85 85 } 86 86 87 - ///Endpoint type for 87 + /// Endpoint type for 88 88 ///com.pdsmoover.admin.requestPdsBackup 89 89 pub struct RequestPdsBackupRequest; 90 90 impl jacquard_common::xrpc::XrpcEndpoint for RequestPdsBackupRequest {
+6 -6
lexicon_types_crate/src/com_pdsmoover/admin/request_repo_backup.rs
··· 39 39 #[serde(bound(deserialize = "'de: 'a"))] 40 40 pub enum RequestRepoBackupError<'a> { 41 41 #[serde(rename = "NotFound")] 42 - NotFound(std::option::Option<String>), 42 + NotFound(std::option::Option<jacquard_common::CowStr<'a>>), 43 43 #[serde(rename = "NotAuthorized")] 44 - NotAuthorized(std::option::Option<String>), 44 + NotAuthorized(std::option::Option<jacquard_common::CowStr<'a>>), 45 45 } 46 46 47 - impl std::fmt::Display for RequestRepoBackupError<'_> { 48 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 47 + impl core::fmt::Display for RequestRepoBackupError<'_> { 48 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 49 49 match self { 50 50 Self::NotFound(msg) => { 51 51 write!(f, "NotFound")?; ··· 66 66 } 67 67 } 68 68 69 - ///Response type for 69 + /// Response type for 70 70 ///com.pdsmoover.admin.requestRepoBackup 71 71 pub struct RequestRepoBackupResponse; 72 72 impl jacquard_common::xrpc::XrpcResp for RequestRepoBackupResponse { ··· 84 84 type Response = RequestRepoBackupResponse; 85 85 } 86 86 87 - ///Endpoint type for 87 + /// Endpoint type for 88 88 ///com.pdsmoover.admin.requestRepoBackup 89 89 pub struct RequestRepoBackupRequest; 90 90 impl jacquard_common::xrpc::XrpcEndpoint for RequestRepoBackupRequest {
+7 -7
lexicon_types_crate/src/com_pdsmoover/admin/sign_up_pds.rs
··· 39 39 #[serde(bound(deserialize = "'de: 'a"))] 40 40 pub enum SignUpPdsError<'a> { 41 41 #[serde(rename = "NotFound")] 42 - NotFound(std::option::Option<String>), 42 + NotFound(std::option::Option<jacquard_common::CowStr<'a>>), 43 43 #[serde(rename = "NotAuthorized")] 44 - NotAuthorized(std::option::Option<String>), 44 + NotAuthorized(std::option::Option<jacquard_common::CowStr<'a>>), 45 45 #[serde(rename = "NotAValidPDS")] 46 - NotAValidPds(std::option::Option<String>), 46 + NotAValidPds(std::option::Option<jacquard_common::CowStr<'a>>), 47 47 } 48 48 49 - impl std::fmt::Display for SignUpPdsError<'_> { 50 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 49 + impl core::fmt::Display for SignUpPdsError<'_> { 50 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 51 51 match self { 52 52 Self::NotFound(msg) => { 53 53 write!(f, "NotFound")?; ··· 75 75 } 76 76 } 77 77 78 - ///Response type for 78 + /// Response type for 79 79 ///com.pdsmoover.admin.signUpPds 80 80 pub struct SignUpPdsResponse; 81 81 impl jacquard_common::xrpc::XrpcResp for SignUpPdsResponse { ··· 93 93 type Response = SignUpPdsResponse; 94 94 } 95 95 96 - ///Endpoint type for 96 + /// Endpoint type for 97 97 ///com.pdsmoover.admin.signUpPds 98 98 pub struct SignUpPdsRequest; 99 99 impl jacquard_common::xrpc::XrpcEndpoint for SignUpPdsRequest {
+5 -5
lexicon_types_crate/src/com_pdsmoover/backup/describe_server.rs
··· 47 47 #[serde(bound(deserialize = "'de: 'a"))] 48 48 pub enum DescribeServerError<'a> { 49 49 #[serde(rename = "RepoNotFound")] 50 - RepoNotFound(std::option::Option<String>), 50 + RepoNotFound(std::option::Option<jacquard_common::CowStr<'a>>), 51 51 } 52 52 53 - impl std::fmt::Display for DescribeServerError<'_> { 54 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 53 + impl core::fmt::Display for DescribeServerError<'_> { 54 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 55 55 match self { 56 56 Self::RepoNotFound(msg) => { 57 57 write!(f, "RepoNotFound")?; ··· 77 77 jacquard_derive::IntoStatic 78 78 )] 79 79 pub struct DescribeServer; 80 - ///Response type for 80 + /// Response type for 81 81 ///com.pdsmoover.backup.describeServer 82 82 pub struct DescribeServerResponse; 83 83 impl jacquard_common::xrpc::XrpcResp for DescribeServerResponse { ··· 93 93 type Response = DescribeServerResponse; 94 94 } 95 95 96 - ///Endpoint type for 96 + /// Endpoint type for 97 97 ///com.pdsmoover.backup.describeServer 98 98 pub struct DescribeServerRequest; 99 99 impl jacquard_common::xrpc::XrpcEndpoint for DescribeServerRequest {
+96 -7
lexicon_types_crate/src/com_pdsmoover/backup/get_repo_status.rs
··· 12 12 Clone, 13 13 PartialEq, 14 14 Eq, 15 - bon::Builder, 16 15 jacquard_derive::IntoStatic 17 16 )] 18 - #[builder(start_fn = new)] 19 17 #[serde(rename_all = "camelCase")] 20 18 pub struct GetRepoStatus<'a> { 21 19 #[serde(borrow)] 22 20 pub did: jacquard_common::types::string::Did<'a>, 23 21 } 24 22 23 + pub mod get_repo_status_state { 24 + 25 + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 26 + #[allow(unused)] 27 + use ::core::marker::PhantomData; 28 + mod sealed { 29 + pub trait Sealed {} 30 + } 31 + /// State trait tracking which required fields have been set 32 + pub trait State: sealed::Sealed { 33 + type Did; 34 + } 35 + /// Empty state - all required fields are unset 36 + pub struct Empty(()); 37 + impl sealed::Sealed for Empty {} 38 + impl State for Empty { 39 + type Did = Unset; 40 + } 41 + ///State transition - sets the `did` field to Set 42 + pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 43 + impl<S: State> sealed::Sealed for SetDid<S> {} 44 + impl<S: State> State for SetDid<S> { 45 + type Did = Set<members::did>; 46 + } 47 + /// Marker types for field names 48 + #[allow(non_camel_case_types)] 49 + pub mod members { 50 + ///Marker type for the `did` field 51 + pub struct did(()); 52 + } 53 + } 54 + 55 + /// Builder for constructing an instance of this type 56 + pub struct GetRepoStatusBuilder<'a, S: get_repo_status_state::State> { 57 + _phantom_state: ::core::marker::PhantomData<fn() -> S>, 58 + __unsafe_private_named: ( 59 + ::core::option::Option<jacquard_common::types::string::Did<'a>>, 60 + ), 61 + _phantom: ::core::marker::PhantomData<&'a ()>, 62 + } 63 + 64 + impl<'a> GetRepoStatus<'a> { 65 + /// Create a new builder for this type 66 + pub fn new() -> GetRepoStatusBuilder<'a, get_repo_status_state::Empty> { 67 + GetRepoStatusBuilder::new() 68 + } 69 + } 70 + 71 + impl<'a> GetRepoStatusBuilder<'a, get_repo_status_state::Empty> { 72 + /// Create a new builder with all fields unset 73 + pub fn new() -> Self { 74 + GetRepoStatusBuilder { 75 + _phantom_state: ::core::marker::PhantomData, 76 + __unsafe_private_named: (None,), 77 + _phantom: ::core::marker::PhantomData, 78 + } 79 + } 80 + } 81 + 82 + impl<'a, S> GetRepoStatusBuilder<'a, S> 83 + where 84 + S: get_repo_status_state::State, 85 + S::Did: get_repo_status_state::IsUnset, 86 + { 87 + /// Set the `did` field (required) 88 + pub fn did( 89 + mut self, 90 + value: impl Into<jacquard_common::types::string::Did<'a>>, 91 + ) -> GetRepoStatusBuilder<'a, get_repo_status_state::SetDid<S>> { 92 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 93 + GetRepoStatusBuilder { 94 + _phantom_state: ::core::marker::PhantomData, 95 + __unsafe_private_named: self.__unsafe_private_named, 96 + _phantom: ::core::marker::PhantomData, 97 + } 98 + } 99 + } 100 + 101 + impl<'a, S> GetRepoStatusBuilder<'a, S> 102 + where 103 + S: get_repo_status_state::State, 104 + S::Did: get_repo_status_state::IsSet, 105 + { 106 + /// Build the final struct 107 + pub fn build(self) -> GetRepoStatus<'a> { 108 + GetRepoStatus { 109 + did: self.__unsafe_private_named.0.unwrap(), 110 + } 111 + } 112 + } 113 + 25 114 #[jacquard_derive::lexicon] 26 115 #[derive( 27 116 serde::Serialize, ··· 76 165 #[serde(bound(deserialize = "'de: 'a"))] 77 166 pub enum GetRepoStatusError<'a> { 78 167 #[serde(rename = "RepoNotFound")] 79 - RepoNotFound(std::option::Option<String>), 168 + RepoNotFound(std::option::Option<jacquard_common::CowStr<'a>>), 80 169 } 81 170 82 - impl std::fmt::Display for GetRepoStatusError<'_> { 83 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 171 + impl core::fmt::Display for GetRepoStatusError<'_> { 172 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 84 173 match self { 85 174 Self::RepoNotFound(msg) => { 86 175 write!(f, "RepoNotFound")?; ··· 94 183 } 95 184 } 96 185 97 - ///Response type for 186 + /// Response type for 98 187 ///com.pdsmoover.backup.getRepoStatus 99 188 pub struct GetRepoStatusResponse; 100 189 impl jacquard_common::xrpc::XrpcResp for GetRepoStatusResponse { ··· 110 199 type Response = GetRepoStatusResponse; 111 200 } 112 201 113 - ///Endpoint type for 202 + /// Endpoint type for 114 203 ///com.pdsmoover.backup.getRepoStatus 115 204 pub struct GetRepoStatusRequest; 116 205 impl jacquard_common::xrpc::XrpcEndpoint for GetRepoStatusRequest {
+6 -6
lexicon_types_crate/src/com_pdsmoover/backup/remove_repo.rs
··· 21 21 #[serde(bound(deserialize = "'de: 'a"))] 22 22 pub enum RemoveRepoError<'a> { 23 23 #[serde(rename = "NotFound")] 24 - NotFound(std::option::Option<String>), 24 + NotFound(std::option::Option<jacquard_common::CowStr<'a>>), 25 25 #[serde(rename = "NotAuthorized")] 26 - NotAuthorized(std::option::Option<String>), 26 + NotAuthorized(std::option::Option<jacquard_common::CowStr<'a>>), 27 27 } 28 28 29 - impl std::fmt::Display for RemoveRepoError<'_> { 30 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 29 + impl core::fmt::Display for RemoveRepoError<'_> { 30 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 31 31 match self { 32 32 Self::NotFound(msg) => { 33 33 write!(f, "NotFound")?; ··· 60 60 jacquard_derive::IntoStatic 61 61 )] 62 62 pub struct RemoveRepo; 63 - ///Response type for 63 + /// Response type for 64 64 ///com.pdsmoover.backup.removeRepo 65 65 pub struct RemoveRepoResponse; 66 66 impl jacquard_common::xrpc::XrpcResp for RemoveRepoResponse { ··· 78 78 type Response = RemoveRepoResponse; 79 79 } 80 80 81 - ///Endpoint type for 81 + /// Endpoint type for 82 82 ///com.pdsmoover.backup.removeRepo 83 83 pub struct RemoveRepoRequest; 84 84 impl jacquard_common::xrpc::XrpcEndpoint for RemoveRepoRequest {
+5 -5
lexicon_types_crate/src/com_pdsmoover/backup/request_backup.rs
··· 22 22 pub enum RequestBackupError<'a> { 23 23 /// A backup has been requested for this repo recently. Please wait a few minutes before requesting again. 24 24 #[serde(rename = "Timeout")] 25 - Timeout(std::option::Option<String>), 25 + Timeout(std::option::Option<jacquard_common::CowStr<'a>>), 26 26 } 27 27 28 - impl std::fmt::Display for RequestBackupError<'_> { 29 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 28 + impl core::fmt::Display for RequestBackupError<'_> { 29 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 30 30 match self { 31 31 Self::Timeout(msg) => { 32 32 write!(f, "Timeout")?; ··· 52 52 jacquard_derive::IntoStatic 53 53 )] 54 54 pub struct RequestBackup; 55 - ///Response type for 55 + /// Response type for 56 56 ///com.pdsmoover.backup.requestBackup 57 57 pub struct RequestBackupResponse; 58 58 impl jacquard_common::xrpc::XrpcResp for RequestBackupResponse { ··· 70 70 type Response = RequestBackupResponse; 71 71 } 72 72 73 - ///Endpoint type for 73 + /// Endpoint type for 74 74 ///com.pdsmoover.backup.requestBackup 75 75 pub struct RequestBackupRequest; 76 76 impl jacquard_common::xrpc::XrpcEndpoint for RequestBackupRequest {
+6 -6
lexicon_types_crate/src/com_pdsmoover/backup/sign_up.rs
··· 21 21 #[serde(bound(deserialize = "'de: 'a"))] 22 22 pub enum SignUpError<'a> { 23 23 #[serde(rename = "AlreadyRegistered")] 24 - AlreadyRegistered(std::option::Option<String>), 24 + AlreadyRegistered(std::option::Option<jacquard_common::CowStr<'a>>), 25 25 #[serde(rename = "NotAuthorized")] 26 - NotAuthorized(std::option::Option<String>), 26 + NotAuthorized(std::option::Option<jacquard_common::CowStr<'a>>), 27 27 } 28 28 29 - impl std::fmt::Display for SignUpError<'_> { 30 - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 29 + impl core::fmt::Display for SignUpError<'_> { 30 + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 31 31 match self { 32 32 Self::AlreadyRegistered(msg) => { 33 33 write!(f, "AlreadyRegistered")?; ··· 60 60 jacquard_derive::IntoStatic 61 61 )] 62 62 pub struct SignUp; 63 - ///Response type for 63 + /// Response type for 64 64 ///com.pdsmoover.backup.signUp 65 65 pub struct SignUpResponse; 66 66 impl jacquard_common::xrpc::XrpcResp for SignUpResponse { ··· 78 78 type Response = SignUpResponse; 79 79 } 80 80 81 - ///Endpoint type for 81 + /// Endpoint type for 82 82 ///com.pdsmoover.backup.signUp 83 83 pub struct SignUpRequest; 84 84 impl jacquard_common::xrpc::XrpcEndpoint for SignUpRequest {
+2
lexicon_types_crate/src/lib.rs
··· 3 3 // This file was automatically generated from Lexicon schemas. 4 4 // Any manual changes will be overwritten on the next regeneration. 5 5 6 + extern crate alloc; 6 7 #[cfg(feature = "app_bsky")] 7 8 pub mod app_bsky; 9 + pub mod builder_types; 8 10 9 11 #[cfg(feature = "com_atproto")] 10 12 pub mod com_atproto;
+72
lexicons/com/atproto/sync/listBlobs.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "com.atproto.sync.listBlobs", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.", 8 + "parameters": { 9 + "type": "params", 10 + "required": [ 11 + "did" 12 + ], 13 + "properties": { 14 + "did": { 15 + "type": "string", 16 + "format": "did", 17 + "description": "The DID of the repo." 18 + }, 19 + "since": { 20 + "type": "string", 21 + "format": "tid", 22 + "description": "Optional revision of the repo to list blobs since." 23 + }, 24 + "limit": { 25 + "type": "integer", 26 + "minimum": 1, 27 + "maximum": 1000, 28 + "default": 500 29 + }, 30 + "cursor": { 31 + "type": "string" 32 + } 33 + } 34 + }, 35 + "output": { 36 + "encoding": "application/json", 37 + "schema": { 38 + "type": "object", 39 + "required": [ 40 + "cids" 41 + ], 42 + "properties": { 43 + "cursor": { 44 + "type": "string" 45 + }, 46 + "cids": { 47 + "type": "array", 48 + "items": { 49 + "type": "string", 50 + "format": "cid" 51 + } 52 + } 53 + } 54 + } 55 + }, 56 + "errors": [ 57 + { 58 + "name": "RepoNotFound" 59 + }, 60 + { 61 + "name": "RepoTakendown" 62 + }, 63 + { 64 + "name": "RepoSuspended" 65 + }, 66 + { 67 + "name": "RepoDeactivated" 68 + } 69 + ] 70 + } 71 + } 72 + }
-1
shared/Cargo.toml
··· 13 13 jacquard-common.workspace = true 14 14 log.workspace = true 15 15 apalis.workspace = true 16 - apalis-sql.workspace = true 17 16 apalis-cron.workspace = true 18 17 serde_json.workspace = true 19 18
+7
shared/migrations/20260214022210_blobs_unique_account_cid.up.sql
··· 1 + -- Drop the existing unique constraint on cid_or_rev alone so that 2 + -- different accounts can have the same CID. 3 + ALTER TABLE blobs DROP CONSTRAINT blobs_cid_or_rev_key; 4 + 5 + -- Add a composite unique constraint: the same account cannot have 6 + -- duplicate cid_or_rev values, but different accounts can. 7 + ALTER TABLE blobs ADD CONSTRAINT blobs_account_did_cid_or_rev_key UNIQUE (account_did, cid_or_rev);
+53 -7
shared/src/db/mod.rs
··· 233 233 234 234 Ok(ManualBackupStartOutcome::Started) 235 235 } 236 + 237 + pub async fn list_blobs( 238 + &self, 239 + did: &str, 240 + cursor: Option<&str>, 241 + limit: i64, 242 + ) -> Result<(Vec<String>, Option<String>)> { 243 + let cids: Vec<String> = if let Some(cursor) = cursor { 244 + sqlx::query!( 245 + r#" 246 + SELECT DISTINCT cid_or_rev 247 + FROM blobs 248 + WHERE account_did = $1 AND type = 'blob' AND cid_or_rev > $2 249 + ORDER BY cid_or_rev 250 + LIMIT $3 251 + "#, 252 + did, 253 + cursor, 254 + limit 255 + ) 256 + .fetch_all(&self.pool) 257 + .await? 258 + .into_iter() 259 + .map(|row| row.cid_or_rev) 260 + .collect() 261 + } else { 262 + sqlx::query!( 263 + r#" 264 + SELECT DISTINCT cid_or_rev 265 + FROM blobs 266 + WHERE account_did = $1 AND type = 'blob' 267 + ORDER BY cid_or_rev 268 + LIMIT $2 269 + "#, 270 + did, 271 + limit 272 + ) 273 + .fetch_all(&self.pool) 274 + .await? 275 + .into_iter() 276 + .map(|row| row.cid_or_rev) 277 + .collect() 278 + }; 279 + 280 + // Return cursor as the last CID if we hit the limit 281 + let next_cursor = if cids.len() == limit as usize { 282 + cids.last().cloned() 283 + } else { 284 + None 285 + }; 286 + 287 + Ok((cids, next_cursor)) 288 + } 236 289 } 237 290 238 291 #[derive(Debug, Clone)] ··· 240 293 NotFound, 241 294 TooSoon { last_backup_started: DateTime<Utc> }, 242 295 Started, 243 - } 244 - 245 - #[derive(Debug, Serialize, Deserialize, FromRow)] 246 - pub struct DemoItem { 247 - pub id: i64, 248 - pub text: String, 249 - pub created_at: DateTime<Utc>, 250 296 } 251 297 252 298 /// Row returned by get_repo_status, containing account details and
+4 -6
shared/src/jobs/mod.rs
··· 142 142 .await?) 143 143 } 144 144 } 145 - //on blob we upsert on cid (shouldnt happen ideally) 145 + //on blob we upsert on (account_did, cid_or_rev) 146 146 models::BlobType::Blob | _ => Ok(sqlx::query_as::<_, BlobModel>( 147 147 r#" 148 148 INSERT INTO blobs (account_did, size, type, cid_or_rev) 149 149 VALUES ($1, $2, $3, $4) 150 - ON CONFLICT (cid_or_rev) DO UPDATE 151 - SET account_did = EXCLUDED.account_did, 152 - size = EXCLUDED.size, 153 - type = EXCLUDED.type, 154 - cid_or_rev = EXCLUDED.cid_or_rev 150 + ON CONFLICT (account_did, cid_or_rev) DO UPDATE 151 + SET size = EXCLUDED.size, 152 + type = EXCLUDED.type 155 153 RETURNING id, created_at, account_did, size, type, cid_or_rev 156 154 "#, 157 155 )
+1
shared/src/jobs/pds_backup.rs
··· 88 88 89 89 if !active_repos.is_empty() { 90 90 // Batch upsert accounts using UNNEST; preserve created_at and pds_sign_up on conflict. 91 + //TODO may filter ones not signed up on the PDS? Be a new SQL query to get those turned on via the PDS? 91 92 let dids_with_revs: Vec<(String, String)> = active_repos 92 93 .iter() 93 94 .map(|(d, rev)| (d.clone(), rev.clone()))
-1
shared/src/jobs/scheduled_back_up_start.rs
··· 120 120 let rev: Option<Tid> = match agent.send(request).await { 121 121 Ok(response) => match response.parse() { 122 122 Ok(output) => { 123 - log::info!("{output:?}"); 124 123 if output.active { 125 124 output.rev 126 125 } else {
+5 -3
shared/src/jobs/upload_blob.rs
··· 198 198 log::warn!("Blob: {cid} not found for: {did}"); 199 199 } 200 200 DownloadCompressAndUploadError::BlobDownloadError => { 201 - //Saliently ignoring atm not to mess with the chunk 201 + //Silently ignoring atm not to mess with the chunk 202 202 } 203 203 }, 204 204 } ··· 235 235 }; 236 236 237 237 let response = atproto_client 238 - .get(repo_url) 238 + .get(repo_url.clone()) 239 239 .header(ACCEPT, accept_type) 240 240 .send() 241 241 .await ··· 259 259 // DownloadCompressAndUploadError::AnyError(Error::Failed(Arc::new(Box::new(e)))) 260 260 // })?; 261 261 return Err(DownloadCompressAndUploadError::AnyError(Error::Failed( 262 - Arc::new(anyhow::anyhow!("Error downloading the blob: {response_status}").into()), 262 + Arc::new( 263 + anyhow::anyhow!("Error downloading the blob: {response_status} {repo_url}").into(), 264 + ), 263 265 ))); 264 266 } 265 267
+84 -7
web/src/handlers/xrpc/com_atproto_sync.rs
··· 1 1 use crate::AppState; 2 2 use crate::handlers::xrpc::{XrpcError, XrpcErrorResponse}; 3 3 use async_compression::tokio::bufread::ZstdDecoder; 4 - use axum::Router; 5 - use axum::body::Body; 6 - use axum::extract::State; 7 - use axum::http::{StatusCode, header}; 8 - use axum::response::Response; 4 + use axum::{ 5 + Router, 6 + body::Body, 7 + extract::State, 8 + http::{StatusCode, header}, 9 + response::Response, 10 + }; 9 11 use jacquard_axum::{ExtractXrpc, IntoRouter}; 10 - use lexicon_types_crate::com_atproto::sync::get_blob::GetBlobRequest; 11 - use lexicon_types_crate::com_atproto::sync::get_repo::GetRepoRequest; 12 + use lexicon_types_crate::{ 13 + com_atproto::sync::get_blob::GetBlobRequest, com_atproto::sync::get_repo::GetRepoRequest, 14 + com_atproto::sync::list_blobs::ListBlobsRequest, 15 + }; 12 16 use s3::error::S3Error; 13 17 use shared::storage::{blob_backup_path, repo_backup_path}; 14 18 use tokio::io::BufReader; ··· 140 144 Ok(response) 141 145 } 142 146 147 + #[axum_macros::debug_handler] 148 + async fn list_blobs( 149 + State(state): State<AppState>, 150 + ExtractXrpc(args): ExtractXrpc<ListBlobsRequest>, 151 + ) -> Result< 152 + axum::Json<lexicon_types_crate::com_atproto::sync::list_blobs::ListBlobsOutput<'static>>, 153 + XrpcErrorResponse, 154 + > { 155 + //Since is not supported sadly since we do not record individual records and keep track of those tids 156 + let did = args.did.to_string(); 157 + let limit = args.limit.unwrap_or(500).min(1000).max(1); 158 + let cursor = args.cursor.as_ref().map(|c| c.as_ref()); 159 + 160 + // Check if account exists 161 + let account_exists = state 162 + .db 163 + .is_user_already_registered(&did) 164 + .await 165 + .map_err(|e| { 166 + tracing::error!(%e, "failed to check if user exists"); 167 + XrpcErrorResponse::internal_server_error() 168 + })?; 169 + 170 + if !account_exists { 171 + return Err(XrpcErrorResponse { 172 + error: XrpcError { 173 + error: "RepoNotFound".to_string(), 174 + message: Some(format!("Could not find repo for DID: {did}")), 175 + }, 176 + status: StatusCode::NOT_FOUND, 177 + }); 178 + } 179 + 180 + // Fetch blobs from database 181 + let (cids, next_cursor) = state 182 + .db 183 + .list_blobs(&did, cursor, limit) 184 + .await 185 + .map_err(|e| { 186 + tracing::error!(%e, "failed to list blobs"); 187 + XrpcErrorResponse::internal_server_error() 188 + })?; 189 + 190 + // Convert to the response type 191 + use lexicon_types_crate::com_atproto::sync::list_blobs::ListBlobsOutput; 192 + 193 + // Parse and validate CIDs, converting them to owned 'static lifetimes 194 + let parsed_cids: Result<Vec<jacquard_common::types::string::Cid<'static>>, XrpcErrorResponse> = 195 + cids.into_iter() 196 + .map(|cid| { 197 + // Validate CID format 198 + jacquard_common::types::string::Cid::new(cid.as_bytes()).map_err(|e| { 199 + tracing::error!(%e, cid = %cid, "failed to parse CID"); 200 + XrpcErrorResponse::internal_server_error() 201 + })?; 202 + // Convert to owned/static by parsing the validated string 203 + Ok(jacquard_common::types::string::Cid::new( 204 + cid.into_bytes().leak() as &'static [u8] 205 + ) 206 + .expect("already validated")) 207 + }) 208 + .collect(); 209 + 210 + let output = ListBlobsOutput { 211 + cids: parsed_cids?, 212 + cursor: next_cursor.map(|c| c.into()), 213 + extra_data: Default::default(), 214 + }; 215 + 216 + Ok(axum::Json(output)) 217 + } 218 + 143 219 pub fn atproto_routes(_state: AppState) -> Router<AppState> { 144 220 Router::new() 145 221 .merge(GetRepoRequest::into_router(get_repo)) 146 222 .merge(GetBlobRequest::into_router(get_blob)) 223 + .merge(ListBlobsRequest::into_router(list_blobs)) 147 224 }
+4 -4
web-ui/src/routes/terms/+page.svelte
··· 13 13 <section class="section"> 14 14 15 15 <h1>Privacy Policy</h1> 16 - <p>Last updated: 2025-10-20</p> 16 + <p>Last updated: 2026-01-16</p> 17 17 18 18 <h2>Overview</h2> 19 19 <p>PDS MOOver performs migrations in your browser. Where possible, operations are client side to minimize ··· 64 64 policy.</p> 65 65 66 66 <h2>Service Provider and Location</h2> 67 - <p>All backup data is currently being stored on <a href="https://upcloud.com/">UpCloud's</a> <a 68 - href="https://upcloud.com/products/object-storage/">object store</a> in a data center located in the US. 69 - UpCloud is also our service provider for the VPS running the services. We may change service providers in 67 + <p>All backup data is currently being stored on <a href="https://railway.com/">Railway's</a> <a 68 + href="https://docs.railway.com/storage-buckets">Storage Buckets</a> in a data center located in the US. 69 + Railway is also our service provider for the VPS running the services. We may change service providers in 70 70 the future, if we do this terms of service will be updated to reflect that.</p> 71 71 72 72 </section>

History

2 rounds 0 comments
sign up or login to add to the discussion
2 commits
expand
listBlobs, bugfix, new vendor
forgot to up the versions
expand 0 comments
pull request successfully merged
1 commit
expand
listBlobs, bugfix, new vendor
expand 0 comments