A better Rust ATProto crate

lexicon and codegen updates.

Orual a679f602 f7ce1f07

+2366 -451
+8 -8
Cargo.lock
··· 1754 1754 1755 1755 [[package]] 1756 1756 name = "jacquard" 1757 - version = "0.3.0" 1757 + version = "0.4.0" 1758 1758 dependencies = [ 1759 1759 "async-trait", 1760 1760 "bon", ··· 1785 1785 1786 1786 [[package]] 1787 1787 name = "jacquard-api" 1788 - version = "0.3.0" 1788 + version = "0.4.0" 1789 1789 dependencies = [ 1790 1790 "bon", 1791 1791 "bytes", ··· 1798 1798 1799 1799 [[package]] 1800 1800 name = "jacquard-axum" 1801 - version = "0.3.0" 1801 + version = "0.4.0" 1802 1802 dependencies = [ 1803 1803 "axum", 1804 1804 "axum-macros", ··· 1821 1821 1822 1822 [[package]] 1823 1823 name = "jacquard-common" 1824 - version = "0.3.0" 1824 + version = "0.4.0" 1825 1825 dependencies = [ 1826 1826 "async-trait", 1827 1827 "base64 0.22.1", ··· 1857 1857 1858 1858 [[package]] 1859 1859 name = "jacquard-derive" 1860 - version = "0.3.0" 1860 + version = "0.4.0" 1861 1861 dependencies = [ 1862 1862 "heck 0.5.0", 1863 1863 "itertools", ··· 1874 1874 1875 1875 [[package]] 1876 1876 name = "jacquard-identity" 1877 - version = "0.3.0" 1877 + version = "0.3.1" 1878 1878 dependencies = [ 1879 1879 "async-trait", 1880 1880 "bon", ··· 1897 1897 1898 1898 [[package]] 1899 1899 name = "jacquard-lexicon" 1900 - version = "0.3.0" 1900 + version = "0.4.0" 1901 1901 dependencies = [ 1902 1902 "async-trait", 1903 1903 "clap", ··· 1926 1926 1927 1927 [[package]] 1928 1928 name = "jacquard-oauth" 1929 - version = "0.3.0" 1929 + version = "0.3.1" 1930 1930 dependencies = [ 1931 1931 "async-trait", 1932 1932 "base64 0.22.1",
+1 -1
Cargo.toml
··· 5 5 6 6 [workspace.package] 7 7 edition = "2024" 8 - version = "0.3.0" 8 + version = "0.4.0" 9 9 authors = ["Orual <orual@nonbinary.computer>"] 10 10 repository = "https://tangled.org/@nonbinary.computer/jacquard" 11 11 keywords = ["atproto", "at", "bluesky", "api", "client"]
+47 -51
crates/jacquard-api/Cargo.toml
··· 2 2 name = "jacquard-api" 3 3 description = "Generated AT Protocol API bindings for Jacquard" 4 4 edition.workspace = true 5 - version.workspace = true 5 + version = "0.4.0" 6 6 authors.workspace = true 7 7 repository.workspace = true 8 8 keywords.workspace = true ··· 12 12 license.workspace = true 13 13 14 14 [package.metadata.docs.rs] 15 - features = [ "bluesky", "other", "ufos" ] 15 + features = [ "bluesky", "other", "lexicon_community", "ufos" ] 16 16 17 17 [dependencies] 18 18 bon.workspace = true 19 19 bytes = { workspace = true, features = ["serde"] } 20 - jacquard-common = { version = "0.3.0", path = "../jacquard-common" } 21 - jacquard-derive = { version = "0.3.0", path = "../jacquard-derive" } 20 + jacquard-common = { version = "*", path = "../jacquard-common" } 21 + jacquard-derive = { version = "*", path = "../jacquard-derive" } 22 22 miette.workspace = true 23 23 serde.workspace = true 24 24 thiserror.workspace = true 25 25 26 26 27 27 [features] 28 - default = [ "com_atproto", "com_bad_example"] 29 - bluesky = [ "com_atproto", "app_bsky", "chat_bsky", "tools_ozone"] 30 - other = ["sh_tangled", "sh_weaver", "pub_leaflet", "net_anisota", "events_smokesignal","network_slices", "tools_smokesignal", "com_whtwnd", "community_lexicon", "place_stream", "blue__2048" ] 31 - lexicon_community = ["community_lexicon", "my_skylights", "com_whtwnd", "social_psky", "lol_atmo", "blue_linkat"] 32 - ufos = ["place_artwork", "moe_karashiiro", "dev_regnault", "buzz_bookhive", "place_artwork", "how_bun", "lol_atmo", "inc_toronto", "uk_ewancroft", "lol_skittr", "win_tomo", "dev_fudgeu", "dev_ocbwoy3", "blog_pckt", "blue_rito", "com_welistskyblue", "net_bnewbold", "club_stellz", "dev_baileytownsend", "net_aftertheinter", "org_devcon","org_robocracy", "garden_lexicon", "social_clippr", "social_grain", "social_pmsky", "com_crabdance", "app_blebbit", "app_ocho", "uk_skyblur", "us_polhem", "blue_atplane", "net_mmatt" ] 33 - app_bsky = [] 34 - chat_bsky = [] 35 - com_atproto = [] 36 - tools_ozone = [] 37 - sh_tangled = [] 38 - sh_weaver = [] 39 - pub_leaflet = [] 40 - net_anisota = [] 41 - network_slices = [] 42 - place_atwork = [] 43 - tools_smokesignal = [] 44 - uk_ewancroft = [] 45 - place_artwork = [] 46 - moe_karashiiro = [] 47 - buzz_bookhive = [] 48 - dev_regnault = [] 49 - events_smokesignal = [] 50 - dev_baileytownsend = [] 28 + default = [ "minimal"] 29 + minimal = [ "com_atproto", "com_bad_example"] 30 + bluesky = [ "com_atproto", "app_bsky", "chat_bsky", "tools_ozone", "minimal"] 31 + other = ["sh_tangled", "sh_weaver", "pub_leaflet", "net_anisota", "network_slices", "tools_smokesignal", "com_whtwnd", "community_lexicon", "place_stream", "blue__2048", "minimal" ] 32 + lexicon_community = ["community_lexicon", "my_skylights", "com_whtwnd", "social_psky", "blue_linkat", "minimal"] 33 + ufos = [ "moe_karashiiro", "dev_regnault", "buzz_bookhive", "uk_ewancroft", "win_tomo_x", "dev_fudgeu", "dev_ocbwoy3", "blog_pckt", "net_bnewbold", "club_stellz", "dev_baileytownsend", "net_aftertheinter", "org_devcon","org_robocracy", "garden_lexicon", "social_clippr", "social_grain", "social_pmsky", "com_crabdance", "app_blebbit", "app_ocho", "uk_skyblur", "us_polhem", "blue_atplane", "net_mmatt", "minimal" ] 34 + 35 + # --- generated --- 36 + # Generated namespace features 37 + # Each namespace feature automatically enables its dependencies 38 + app_blebbit = [] 39 + app_bsky = ["com_atproto"] 40 + app_ocho = [] 41 + beauty_cybernetic = [] 42 + blog_pckt = [] 51 43 blue__2048 = [] 52 44 blue_atplane = [] 45 + blue_linkat = [] 46 + blue_zio = [] 47 + buzz_bookhive = [] 48 + chat_bsky = ["app_bsky"] 53 49 club_stellz = [] 54 - net_mmatt = [] 55 - how_bun = [] 56 - lol_atmo = [] 57 - lol_skittr = [] 58 - win_tomo = [] 59 - inc_toronto = [] 50 + com_atproto = [] 60 51 com_bad_example = [] 61 - dev_ocbwoy3 = [] 62 - dev_fudgeu = [] 63 - com_welistskyblue = [] 64 - blog_pckt = [] 65 - blue_rito = [] 66 - net_bnewbold = [] 67 - win_tomo_x = [] 52 + com_crabdance = [] 68 53 com_shinolabs = [] 69 - fyi_unravel = [] 70 - blue_zio = [] 71 - blue_linkat = [] 72 54 com_whtwnd = [] 73 55 community_lexicon = [] 74 - social_psky = [] 75 - place_stream = [] 56 + dev_baileytownsend = [] 57 + dev_fudgeu = [] 58 + dev_ocbwoy3 = [] 59 + dev_regnault = [] 60 + fyi_unravel = [] 61 + garden_lexicon = [] 62 + moe_karashiiro = [] 76 63 my_skylights = [] 77 64 net_aftertheinter = [] 65 + net_anisota = ["app_bsky", "com_atproto"] 66 + net_bnewbold = [] 67 + net_mmatt = [] 68 + network_slices = [] 78 69 org_devcon = [] 79 70 org_robocracy = [] 80 - garden_lexicon = [] 71 + place_atwork = [] 72 + place_stream = [] 73 + pub_leaflet = [] 74 + sh_tangled = [] 75 + sh_weaver = ["app_bsky"] 81 76 social_clippr = [] 82 - social_grain = [] 77 + social_grain = ["com_atproto"] 83 78 social_pmsky = [] 84 - com_crabdance = [] 85 - app_blebbit = [] 86 - beauty_cybernetic = [] 87 - app_ocho = [] 79 + social_psky = [] 80 + tools_ozone = ["chat_bsky", "com_atproto"] 81 + tools_smokesignal = [] 82 + uk_ewancroft = [] 88 83 uk_skyblur = [] 89 84 us_polhem = [] 85 + win_tomo_x = []
+46
crates/jacquard-api/lexicons/events_smokesignal_automation_InvokeWebhook.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "events.smokesignal.automation.InvokeWebhook", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Process a Smoke Signal webhook event.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "event", 14 + "record", 15 + "context" 16 + ], 17 + "properties": { 18 + "context": { 19 + "type": "object", 20 + "properties": {} 21 + }, 22 + "event": { 23 + "type": "string", 24 + "knownValues": [ 25 + "test", 26 + "rsvp.created", 27 + "event.created" 28 + ] 29 + }, 30 + "record": { 31 + "type": "object", 32 + "properties": {} 33 + } 34 + } 35 + } 36 + }, 37 + "output": { 38 + "encoding": "application/json", 39 + "schema": { 40 + "type": "object", 41 + "properties": {} 42 + } 43 + } 44 + } 45 + } 46 + }
+18
crates/jacquard-api/src/app_bsky/actor/status.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///Advertises an account as currently offering live content. 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Live; 20 + impl std::fmt::Display for Live { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "live") 23 + } 24 + } 25 + 8 26 ///A declaration of a Bluesky account status. 9 27 #[jacquard_derive::lexicon] 10 28 #[derive(
+252
crates/jacquard-api/src/app_bsky/feed.rs
··· 68 68 pub uri: jacquard_common::types::string::AtUri<'a>, 69 69 } 70 70 71 + ///User clicked through to the author of the feed item 72 + #[derive( 73 + serde::Serialize, 74 + serde::Deserialize, 75 + Debug, 76 + Clone, 77 + PartialEq, 78 + Eq, 79 + Hash, 80 + jacquard_derive::IntoStatic 81 + )] 82 + pub struct ClickthroughAuthor; 83 + impl std::fmt::Display for ClickthroughAuthor { 84 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 85 + write!(f, "clickthroughAuthor") 86 + } 87 + } 88 + 89 + ///User clicked through to the embedded content of the feed item 90 + #[derive( 91 + serde::Serialize, 92 + serde::Deserialize, 93 + Debug, 94 + Clone, 95 + PartialEq, 96 + Eq, 97 + Hash, 98 + jacquard_derive::IntoStatic 99 + )] 100 + pub struct ClickthroughEmbed; 101 + impl std::fmt::Display for ClickthroughEmbed { 102 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 103 + write!(f, "clickthroughEmbed") 104 + } 105 + } 106 + 107 + ///User clicked through to the feed item 108 + #[derive( 109 + serde::Serialize, 110 + serde::Deserialize, 111 + Debug, 112 + Clone, 113 + PartialEq, 114 + Eq, 115 + Hash, 116 + jacquard_derive::IntoStatic 117 + )] 118 + pub struct ClickthroughItem; 119 + impl std::fmt::Display for ClickthroughItem { 120 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 121 + write!(f, "clickthroughItem") 122 + } 123 + } 124 + 125 + ///User clicked through to the reposter of the feed item 126 + #[derive( 127 + serde::Serialize, 128 + serde::Deserialize, 129 + Debug, 130 + Clone, 131 + PartialEq, 132 + Eq, 133 + Hash, 134 + jacquard_derive::IntoStatic 135 + )] 136 + pub struct ClickthroughReposter; 137 + impl std::fmt::Display for ClickthroughReposter { 138 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 139 + write!(f, "clickthroughReposter") 140 + } 141 + } 142 + 143 + ///Declares the feed generator returns any types of posts. 144 + #[derive( 145 + serde::Serialize, 146 + serde::Deserialize, 147 + Debug, 148 + Clone, 149 + PartialEq, 150 + Eq, 151 + Hash, 152 + jacquard_derive::IntoStatic 153 + )] 154 + pub struct ContentModeUnspecified; 155 + impl std::fmt::Display for ContentModeUnspecified { 156 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 157 + write!(f, "contentModeUnspecified") 158 + } 159 + } 160 + 161 + ///Declares the feed generator returns posts containing app.bsky.embed.video embeds. 162 + #[derive( 163 + serde::Serialize, 164 + serde::Deserialize, 165 + Debug, 166 + Clone, 167 + PartialEq, 168 + Eq, 169 + Hash, 170 + jacquard_derive::IntoStatic 171 + )] 172 + pub struct ContentModeVideo; 173 + impl std::fmt::Display for ContentModeVideo { 174 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 175 + write!(f, "contentModeVideo") 176 + } 177 + } 178 + 71 179 #[jacquard_derive::lexicon] 72 180 #[derive( 73 181 serde::Serialize, ··· 205 313 pub req_id: std::option::Option<jacquard_common::CowStr<'a>>, 206 314 } 207 315 316 + ///User liked the feed item 317 + #[derive( 318 + serde::Serialize, 319 + serde::Deserialize, 320 + Debug, 321 + Clone, 322 + PartialEq, 323 + Eq, 324 + Hash, 325 + jacquard_derive::IntoStatic 326 + )] 327 + pub struct InteractionLike; 328 + impl std::fmt::Display for InteractionLike { 329 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 330 + write!(f, "interactionLike") 331 + } 332 + } 333 + 334 + ///User quoted the feed item 335 + #[derive( 336 + serde::Serialize, 337 + serde::Deserialize, 338 + Debug, 339 + Clone, 340 + PartialEq, 341 + Eq, 342 + Hash, 343 + jacquard_derive::IntoStatic 344 + )] 345 + pub struct InteractionQuote; 346 + impl std::fmt::Display for InteractionQuote { 347 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 348 + write!(f, "interactionQuote") 349 + } 350 + } 351 + 352 + ///User replied to the feed item 353 + #[derive( 354 + serde::Serialize, 355 + serde::Deserialize, 356 + Debug, 357 + Clone, 358 + PartialEq, 359 + Eq, 360 + Hash, 361 + jacquard_derive::IntoStatic 362 + )] 363 + pub struct InteractionReply; 364 + impl std::fmt::Display for InteractionReply { 365 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 366 + write!(f, "interactionReply") 367 + } 368 + } 369 + 370 + ///User reposted the feed item 371 + #[derive( 372 + serde::Serialize, 373 + serde::Deserialize, 374 + Debug, 375 + Clone, 376 + PartialEq, 377 + Eq, 378 + Hash, 379 + jacquard_derive::IntoStatic 380 + )] 381 + pub struct InteractionRepost; 382 + impl std::fmt::Display for InteractionRepost { 383 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 384 + write!(f, "interactionRepost") 385 + } 386 + } 387 + 388 + ///Feed item was seen by user 389 + #[derive( 390 + serde::Serialize, 391 + serde::Deserialize, 392 + Debug, 393 + Clone, 394 + PartialEq, 395 + Eq, 396 + Hash, 397 + jacquard_derive::IntoStatic 398 + )] 399 + pub struct InteractionSeen; 400 + impl std::fmt::Display for InteractionSeen { 401 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 402 + write!(f, "interactionSeen") 403 + } 404 + } 405 + 406 + ///User shared the feed item 407 + #[derive( 408 + serde::Serialize, 409 + serde::Deserialize, 410 + Debug, 411 + Clone, 412 + PartialEq, 413 + Eq, 414 + Hash, 415 + jacquard_derive::IntoStatic 416 + )] 417 + pub struct InteractionShare; 418 + impl std::fmt::Display for InteractionShare { 419 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 420 + write!(f, "interactionShare") 421 + } 422 + } 423 + 208 424 #[jacquard_derive::lexicon] 209 425 #[derive( 210 426 serde::Serialize, ··· 377 593 #[serde(tag = "$type")] 378 594 #[serde(bound(deserialize = "'de: 'a"))] 379 595 pub enum ReplyRefRecordRoot<'a> {} 596 + ///Request that less content like the given feed item be shown in the feed 597 + #[derive( 598 + serde::Serialize, 599 + serde::Deserialize, 600 + Debug, 601 + Clone, 602 + PartialEq, 603 + Eq, 604 + Hash, 605 + jacquard_derive::IntoStatic 606 + )] 607 + pub struct RequestLess; 608 + impl std::fmt::Display for RequestLess { 609 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 610 + write!(f, "requestLess") 611 + } 612 + } 613 + 614 + ///Request that more content like the given feed item be shown in the feed 615 + #[derive( 616 + serde::Serialize, 617 + serde::Deserialize, 618 + Debug, 619 + Clone, 620 + PartialEq, 621 + Eq, 622 + Hash, 623 + jacquard_derive::IntoStatic 624 + )] 625 + pub struct RequestMore; 626 + impl std::fmt::Display for RequestMore { 627 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 628 + write!(f, "requestMore") 629 + } 630 + } 631 + 380 632 #[jacquard_derive::lexicon] 381 633 #[derive( 382 634 serde::Serialize,
+54
crates/jacquard-api/src/app_bsky/graph.rs
··· 36 36 pub mod unmute_thread; 37 37 pub mod verification; 38 38 39 + ///A list of actors used for curation purposes such as list feeds or interaction gating. 40 + #[derive( 41 + serde::Serialize, 42 + serde::Deserialize, 43 + Debug, 44 + Clone, 45 + PartialEq, 46 + Eq, 47 + Hash, 48 + jacquard_derive::IntoStatic 49 + )] 50 + pub struct Curatelist; 51 + impl std::fmt::Display for Curatelist { 52 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 53 + write!(f, "curatelist") 54 + } 55 + } 56 + 39 57 #[jacquard_derive::lexicon] 40 58 #[derive( 41 59 serde::Serialize, ··· 237 255 pub muted: std::option::Option<bool>, 238 256 } 239 257 258 + ///A list of actors to apply an aggregate moderation action (mute/block) on. 259 + #[derive( 260 + serde::Serialize, 261 + serde::Deserialize, 262 + Debug, 263 + Clone, 264 + PartialEq, 265 + Eq, 266 + Hash, 267 + jacquard_derive::IntoStatic 268 + )] 269 + pub struct Modlist; 270 + impl std::fmt::Display for Modlist { 271 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 272 + write!(f, "modlist") 273 + } 274 + } 275 + 240 276 ///indicates that a handle or DID could not be resolved 241 277 #[jacquard_derive::lexicon] 242 278 #[derive( ··· 253 289 #[serde(borrow)] 254 290 pub actor: jacquard_common::types::ident::AtIdentifier<'a>, 255 291 pub not_found: bool, 292 + } 293 + 294 + ///A list of actors used for only for reference purposes such as within a starter pack. 295 + #[derive( 296 + serde::Serialize, 297 + serde::Deserialize, 298 + Debug, 299 + Clone, 300 + PartialEq, 301 + Eq, 302 + Hash, 303 + jacquard_derive::IntoStatic 304 + )] 305 + pub struct Referencelist; 306 + impl std::fmt::Display for Referencelist { 307 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 308 + write!(f, "referencelist") 309 + } 256 310 } 257 311 258 312 ///lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)
+90
crates/jacquard-api/src/buzz_bookhive.rs
··· 12 12 pub mod hive_book; 13 13 pub mod search_books; 14 14 15 + ///User has abandoned the book 16 + #[derive( 17 + serde::Serialize, 18 + serde::Deserialize, 19 + Debug, 20 + Clone, 21 + PartialEq, 22 + Eq, 23 + Hash, 24 + jacquard_derive::IntoStatic 25 + )] 26 + pub struct Abandoned; 27 + impl std::fmt::Display for Abandoned { 28 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 29 + write!(f, "abandoned") 30 + } 31 + } 32 + 15 33 #[jacquard_derive::lexicon] 16 34 #[derive( 17 35 serde::Serialize, ··· 64 82 pub parent: crate::com_atproto::repo::strong_ref::StrongRef<'a>, 65 83 } 66 84 85 + ///User has finished reading the book 86 + #[derive( 87 + serde::Serialize, 88 + serde::Deserialize, 89 + Debug, 90 + Clone, 91 + PartialEq, 92 + Eq, 93 + Hash, 94 + jacquard_derive::IntoStatic 95 + )] 96 + pub struct Finished; 97 + impl std::fmt::Display for Finished { 98 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 99 + write!(f, "finished") 100 + } 101 + } 102 + 103 + ///User owns the book 104 + #[derive( 105 + serde::Serialize, 106 + serde::Deserialize, 107 + Debug, 108 + Clone, 109 + PartialEq, 110 + Eq, 111 + Hash, 112 + jacquard_derive::IntoStatic 113 + )] 114 + pub struct Owned; 115 + impl std::fmt::Display for Owned { 116 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 117 + write!(f, "owned") 118 + } 119 + } 120 + 67 121 #[jacquard_derive::lexicon] 68 122 #[derive( 69 123 serde::Serialize, ··· 88 142 #[serde(borrow)] 89 143 pub handle: jacquard_common::CowStr<'a>, 90 144 pub reviews: i64, 145 + } 146 + 147 + ///User is currently reading the book 148 + #[derive( 149 + serde::Serialize, 150 + serde::Deserialize, 151 + Debug, 152 + Clone, 153 + PartialEq, 154 + Eq, 155 + Hash, 156 + jacquard_derive::IntoStatic 157 + )] 158 + pub struct Reading; 159 + impl std::fmt::Display for Reading { 160 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 161 + write!(f, "reading") 162 + } 91 163 } 92 164 93 165 #[jacquard_derive::lexicon] ··· 170 242 ///The title of the book 171 243 #[serde(borrow)] 172 244 pub title: jacquard_common::CowStr<'a>, 245 + } 246 + 247 + ///User wants to read the book 248 + #[derive( 249 + serde::Serialize, 250 + serde::Deserialize, 251 + Debug, 252 + Clone, 253 + PartialEq, 254 + Eq, 255 + Hash, 256 + jacquard_derive::IntoStatic 257 + )] 258 + pub struct WantToRead; 259 + impl std::fmt::Display for WantToRead { 260 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 261 + write!(f, "wantToRead") 262 + } 173 263 }
+126
crates/jacquard-api/src/com_atproto/moderation.rs
··· 7 7 8 8 pub mod create_report; 9 9 10 + ///Appeal a previously taken moderation action 11 + #[derive( 12 + serde::Serialize, 13 + serde::Deserialize, 14 + Debug, 15 + Clone, 16 + PartialEq, 17 + Eq, 18 + Hash, 19 + jacquard_derive::IntoStatic 20 + )] 21 + pub struct ReasonAppeal; 22 + impl std::fmt::Display for ReasonAppeal { 23 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 24 + write!(f, "reasonAppeal") 25 + } 26 + } 27 + 28 + ///Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. 29 + #[derive( 30 + serde::Serialize, 31 + serde::Deserialize, 32 + Debug, 33 + Clone, 34 + PartialEq, 35 + Eq, 36 + Hash, 37 + jacquard_derive::IntoStatic 38 + )] 39 + pub struct ReasonMisleading; 40 + impl std::fmt::Display for ReasonMisleading { 41 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 42 + write!(f, "reasonMisleading") 43 + } 44 + } 45 + 46 + ///Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`. 47 + #[derive( 48 + serde::Serialize, 49 + serde::Deserialize, 50 + Debug, 51 + Clone, 52 + PartialEq, 53 + Eq, 54 + Hash, 55 + jacquard_derive::IntoStatic 56 + )] 57 + pub struct ReasonOther; 58 + impl std::fmt::Display for ReasonOther { 59 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 60 + write!(f, "reasonOther") 61 + } 62 + } 63 + 64 + ///Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. 65 + #[derive( 66 + serde::Serialize, 67 + serde::Deserialize, 68 + Debug, 69 + Clone, 70 + PartialEq, 71 + Eq, 72 + Hash, 73 + jacquard_derive::IntoStatic 74 + )] 75 + pub struct ReasonRude; 76 + impl std::fmt::Display for ReasonRude { 77 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 78 + write!(f, "reasonRude") 79 + } 80 + } 81 + 82 + ///Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. 83 + #[derive( 84 + serde::Serialize, 85 + serde::Deserialize, 86 + Debug, 87 + Clone, 88 + PartialEq, 89 + Eq, 90 + Hash, 91 + jacquard_derive::IntoStatic 92 + )] 93 + pub struct ReasonSexual; 94 + impl std::fmt::Display for ReasonSexual { 95 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 96 + write!(f, "reasonSexual") 97 + } 98 + } 99 + 100 + ///Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. 101 + #[derive( 102 + serde::Serialize, 103 + serde::Deserialize, 104 + Debug, 105 + Clone, 106 + PartialEq, 107 + Eq, 108 + Hash, 109 + jacquard_derive::IntoStatic 110 + )] 111 + pub struct ReasonSpam; 112 + impl std::fmt::Display for ReasonSpam { 113 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 114 + write!(f, "reasonSpam") 115 + } 116 + } 117 + 10 118 #[derive(Debug, Clone, PartialEq, Eq, Hash)] 11 119 pub enum ReasonType<'a> { 12 120 ComAtprotoModerationDefsReasonSpam, ··· 681 789 } 682 790 ReasonType::Other(v) => ReasonType::Other(v.into_static()), 683 791 } 792 + } 793 + } 794 + 795 + ///Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. 796 + #[derive( 797 + serde::Serialize, 798 + serde::Deserialize, 799 + Debug, 800 + Clone, 801 + PartialEq, 802 + Eq, 803 + Hash, 804 + jacquard_derive::IntoStatic 805 + )] 806 + pub struct ReasonViolation; 807 + impl std::fmt::Display for ReasonViolation { 808 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 809 + write!(f, "reasonViolation") 684 810 } 685 811 } 686 812
+144
crates/jacquard-api/src/community_lexicon/calendar/event.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///The event has been cancelled. 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Cancelled; 20 + impl std::fmt::Display for Cancelled { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "cancelled") 23 + } 24 + } 25 + 26 + ///A hybrid event that takes place both online and offline. 27 + #[derive( 28 + serde::Serialize, 29 + serde::Deserialize, 30 + Debug, 31 + Clone, 32 + PartialEq, 33 + Eq, 34 + Hash, 35 + jacquard_derive::IntoStatic 36 + )] 37 + pub struct Hybrid; 38 + impl std::fmt::Display for Hybrid { 39 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 40 + write!(f, "hybrid") 41 + } 42 + } 43 + 44 + ///An in-person event that takes place offline. 45 + #[derive( 46 + serde::Serialize, 47 + serde::Deserialize, 48 + Debug, 49 + Clone, 50 + PartialEq, 51 + Eq, 52 + Hash, 53 + jacquard_derive::IntoStatic 54 + )] 55 + pub struct Inperson; 56 + impl std::fmt::Display for Inperson { 57 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 58 + write!(f, "inperson") 59 + } 60 + } 61 + 8 62 ///A calendar event. 9 63 #[jacquard_derive::lexicon] 10 64 #[derive( ··· 165 219 } 166 220 } 167 221 222 + ///The event has been created, but not finalized. 223 + #[derive( 224 + serde::Serialize, 225 + serde::Deserialize, 226 + Debug, 227 + Clone, 228 + PartialEq, 229 + Eq, 230 + Hash, 231 + jacquard_derive::IntoStatic 232 + )] 233 + pub struct Planned; 234 + impl std::fmt::Display for Planned { 235 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 236 + write!(f, "planned") 237 + } 238 + } 239 + 240 + ///The event has been postponed and a new start date has not been set. 241 + #[derive( 242 + serde::Serialize, 243 + serde::Deserialize, 244 + Debug, 245 + Clone, 246 + PartialEq, 247 + Eq, 248 + Hash, 249 + jacquard_derive::IntoStatic 250 + )] 251 + pub struct Postponed; 252 + impl std::fmt::Display for Postponed { 253 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 254 + write!(f, "postponed") 255 + } 256 + } 257 + 258 + ///The event has been rescheduled. 259 + #[derive( 260 + serde::Serialize, 261 + serde::Deserialize, 262 + Debug, 263 + Clone, 264 + PartialEq, 265 + Eq, 266 + Hash, 267 + jacquard_derive::IntoStatic 268 + )] 269 + pub struct Rescheduled; 270 + impl std::fmt::Display for Rescheduled { 271 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 272 + write!(f, "rescheduled") 273 + } 274 + } 275 + 276 + ///The event has been created and scheduled. 277 + #[derive( 278 + serde::Serialize, 279 + serde::Deserialize, 280 + Debug, 281 + Clone, 282 + PartialEq, 283 + Eq, 284 + Hash, 285 + jacquard_derive::IntoStatic 286 + )] 287 + pub struct Scheduled; 288 + impl std::fmt::Display for Scheduled { 289 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 290 + write!(f, "scheduled") 291 + } 292 + } 293 + 168 294 ///The status of the event. 169 295 #[derive(Debug, Clone, PartialEq, Eq, Hash)] 170 296 pub enum Status<'a> { ··· 316 442 pub name: std::option::Option<jacquard_common::CowStr<'a>>, 317 443 #[serde(borrow)] 318 444 pub uri: jacquard_common::types::string::Uri<'a>, 445 + } 446 + 447 + ///A virtual event that takes place online. 448 + #[derive( 449 + serde::Serialize, 450 + serde::Deserialize, 451 + Debug, 452 + Clone, 453 + PartialEq, 454 + Eq, 455 + Hash, 456 + jacquard_derive::IntoStatic 457 + )] 458 + pub struct Virtual; 459 + impl std::fmt::Display for Virtual { 460 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 461 + write!(f, "virtual") 462 + } 319 463 }
+54
crates/jacquard-api/src/community_lexicon/calendar/rsvp.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///Going to the event 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Going; 20 + impl std::fmt::Display for Going { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "going") 23 + } 24 + } 25 + 26 + ///Interested in the event 27 + #[derive( 28 + serde::Serialize, 29 + serde::Deserialize, 30 + Debug, 31 + Clone, 32 + PartialEq, 33 + Eq, 34 + Hash, 35 + jacquard_derive::IntoStatic 36 + )] 37 + pub struct Interested; 38 + impl std::fmt::Display for Interested { 39 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 40 + write!(f, "interested") 41 + } 42 + } 43 + 8 44 ///An RSVP for an event. 9 45 #[jacquard_derive::lexicon] 10 46 #[derive( ··· 26 62 27 63 impl jacquard_common::types::collection::Collection for Rsvp<'_> { 28 64 const NSID: &'static str = "community.lexicon.calendar.rsvp"; 65 + } 66 + 67 + ///Not going to the event 68 + #[derive( 69 + serde::Serialize, 70 + serde::Deserialize, 71 + Debug, 72 + Clone, 73 + PartialEq, 74 + Eq, 75 + Hash, 76 + jacquard_derive::IntoStatic 77 + )] 78 + pub struct Notgoing; 79 + impl std::fmt::Display for Notgoing { 80 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 81 + write!(f, "notgoing") 82 + } 29 83 }
-6
crates/jacquard-api/src/events_smokesignal.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 - pub mod automation;
-6
crates/jacquard-api/src/events_smokesignal/automation.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 - pub mod invoke_webhook;
-78
crates/jacquard-api/src/events_smokesignal/automation/invoke_webhook.rs
··· 1 - // @generated by jacquard-lexicon. DO NOT EDIT. 2 - // 3 - // Lexicon: events.smokesignal.automation.InvokeWebhook 4 - // 5 - // This file was automatically generated from Lexicon schemas. 6 - // Any manual changes will be overwritten on the next regeneration. 7 - 8 - #[jacquard_derive::lexicon] 9 - #[derive( 10 - serde::Serialize, 11 - serde::Deserialize, 12 - Debug, 13 - Clone, 14 - PartialEq, 15 - Eq, 16 - bon::Builder, 17 - jacquard_derive::IntoStatic 18 - )] 19 - #[serde(rename_all = "camelCase")] 20 - #[builder(start_fn = new)] 21 - pub struct InvokeWebhook<'a> { 22 - #[serde(borrow)] 23 - pub context: InvokeWebhookRecordContext<'a>, 24 - #[serde(borrow)] 25 - #[builder(into)] 26 - pub event: jacquard_common::CowStr<'a>, 27 - #[serde(borrow)] 28 - pub record: InvokeWebhookRecordRecord<'a>, 29 - #[serde(flatten)] 30 - #[serde(borrow)] 31 - #[builder(default)] 32 - pub extra_data: ::std::collections::BTreeMap< 33 - ::jacquard_common::smol_str::SmolStr, 34 - ::jacquard_common::types::value::Data<'a>, 35 - >, 36 - } 37 - 38 - #[jacquard_derive::lexicon] 39 - #[derive( 40 - serde::Serialize, 41 - serde::Deserialize, 42 - Debug, 43 - Clone, 44 - PartialEq, 45 - Eq, 46 - jacquard_derive::IntoStatic 47 - )] 48 - #[serde(rename_all = "camelCase")] 49 - pub struct InvokeWebhookOutput<'a> {} 50 - ///Response type for 51 - ///events.smokesignal.automation.InvokeWebhook 52 - pub struct InvokeWebhookResponse; 53 - impl jacquard_common::xrpc::XrpcResp for InvokeWebhookResponse { 54 - const NSID: &'static str = "events.smokesignal.automation.InvokeWebhook"; 55 - const ENCODING: &'static str = "application/json"; 56 - type Output<'de> = InvokeWebhookOutput<'de>; 57 - type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 58 - } 59 - 60 - impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for InvokeWebhook<'de> { 61 - const NSID: &'static str = "events.smokesignal.automation.InvokeWebhook"; 62 - const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 63 - "application/json", 64 - ); 65 - type Response = InvokeWebhookResponse; 66 - } 67 - 68 - ///Endpoint type for 69 - ///events.smokesignal.automation.InvokeWebhook 70 - pub struct InvokeWebhookRequest; 71 - impl jacquard_common::xrpc::XrpcEndpoint for InvokeWebhookRequest { 72 - const PATH: &'static str = "/xrpc/events.smokesignal.automation.InvokeWebhook"; 73 - const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 74 - "application/json", 75 - ); 76 - type Request<'de> = InvokeWebhook<'de>; 77 - type Response = InvokeWebhookResponse; 78 - }
-6
crates/jacquard-api/src/lol_atmo.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 - pub mod link;
-28
crates/jacquard-api/src/lol_atmo/link.rs
··· 1 - // @generated by jacquard-lexicon. DO NOT EDIT. 2 - // 3 - // Lexicon: lol.atmo.link 4 - // 5 - // This file was automatically generated from Lexicon schemas. 6 - // Any manual changes will be overwritten on the next regeneration. 7 - 8 - #[jacquard_derive::lexicon] 9 - #[derive( 10 - serde::Serialize, 11 - serde::Deserialize, 12 - Debug, 13 - Clone, 14 - PartialEq, 15 - Eq, 16 - jacquard_derive::IntoStatic 17 - )] 18 - #[serde(rename_all = "camelCase")] 19 - pub struct Link<'a> { 20 - #[serde(borrow)] 21 - pub short: jacquard_common::CowStr<'a>, 22 - #[serde(borrow)] 23 - pub url: jacquard_common::CowStr<'a>, 24 - } 25 - 26 - impl jacquard_common::types::collection::Collection for Link<'_> { 27 - const NSID: &'static str = "lol.atmo.link"; 28 - }
-7
crates/jacquard-api/src/lol_skittr.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 - pub mod actor; 7 - pub mod server;
-7
crates/jacquard-api/src/lol_skittr/actor.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 - pub mod get_theme; 7 - pub mod theme;
-66
crates/jacquard-api/src/lol_skittr/actor/get_theme.rs
··· 1 - // @generated by jacquard-lexicon. DO NOT EDIT. 2 - // 3 - // Lexicon: lol.skittr.actor.getTheme 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 - bon::Builder, 16 - jacquard_derive::IntoStatic 17 - )] 18 - #[builder(start_fn = new)] 19 - #[serde(rename_all = "camelCase")] 20 - pub struct GetTheme<'a> { 21 - #[serde(borrow)] 22 - pub actor: jacquard_common::types::ident::AtIdentifier<'a>, 23 - } 24 - 25 - #[jacquard_derive::lexicon] 26 - #[derive( 27 - serde::Serialize, 28 - serde::Deserialize, 29 - Debug, 30 - Clone, 31 - PartialEq, 32 - Eq, 33 - jacquard_derive::IntoStatic 34 - )] 35 - #[serde(rename_all = "camelCase")] 36 - pub struct GetThemeOutput<'a> { 37 - #[serde(flatten)] 38 - #[serde(borrow)] 39 - pub value: crate::lol_skittr::actor::theme::Theme<'a>, 40 - } 41 - 42 - ///Response type for 43 - ///lol.skittr.actor.getTheme 44 - pub struct GetThemeResponse; 45 - impl jacquard_common::xrpc::XrpcResp for GetThemeResponse { 46 - const NSID: &'static str = "lol.skittr.actor.getTheme"; 47 - const ENCODING: &'static str = "application/json"; 48 - type Output<'de> = GetThemeOutput<'de>; 49 - type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 50 - } 51 - 52 - impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for GetTheme<'de> { 53 - const NSID: &'static str = "lol.skittr.actor.getTheme"; 54 - const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 55 - type Response = GetThemeResponse; 56 - } 57 - 58 - ///Endpoint type for 59 - ///lol.skittr.actor.getTheme 60 - pub struct GetThemeRequest; 61 - impl jacquard_common::xrpc::XrpcEndpoint for GetThemeRequest { 62 - const PATH: &'static str = "/xrpc/lol.skittr.actor.getTheme"; 63 - const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 64 - type Request<'de> = GetTheme<'de>; 65 - type Response = GetThemeResponse; 66 - }
-39
crates/jacquard-api/src/lol_skittr/actor/theme.rs
··· 1 - // @generated by jacquard-lexicon. DO NOT EDIT. 2 - // 3 - // Lexicon: lol.skittr.actor.theme 4 - // 5 - // This file was automatically generated from Lexicon schemas. 6 - // Any manual changes will be overwritten on the next regeneration. 7 - 8 - ///Profile customization values 9 - #[jacquard_derive::lexicon] 10 - #[derive( 11 - serde::Serialize, 12 - serde::Deserialize, 13 - Debug, 14 - Clone, 15 - PartialEq, 16 - Eq, 17 - jacquard_derive::IntoStatic 18 - )] 19 - #[serde(rename_all = "camelCase")] 20 - pub struct Theme<'a> { 21 - ///A background image, must be either PNG or JPEG 22 - #[serde(skip_serializing_if = "std::option::Option::is_none")] 23 - #[serde(borrow)] 24 - pub background: std::option::Option<jacquard_common::types::blob::Blob<'a>>, 25 - #[serde(borrow)] 26 - pub bg_color: jacquard_common::CowStr<'a>, 27 - #[serde(borrow)] 28 - pub link_color: jacquard_common::CowStr<'a>, 29 - #[serde(borrow)] 30 - pub side_border: jacquard_common::CowStr<'a>, 31 - #[serde(borrow)] 32 - pub side_color: jacquard_common::CowStr<'a>, 33 - #[serde(borrow)] 34 - pub text_color: jacquard_common::CowStr<'a>, 35 - } 36 - 37 - impl jacquard_common::types::collection::Collection for Theme<'_> { 38 - const NSID: &'static str = "lol.skittr.actor.theme"; 39 - }
-6
crates/jacquard-api/src/lol_skittr/server.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 - pub mod get_meta;
-67
crates/jacquard-api/src/lol_skittr/server/get_meta.rs
··· 1 - // @generated by jacquard-lexicon. DO NOT EDIT. 2 - // 3 - // Lexicon: lol.skittr.server.getMeta 4 - // 5 - // This file was automatically generated from Lexicon schemas. 6 - // Any manual changes will be overwritten on the next regeneration. 7 - 8 - #[jacquard_derive::lexicon] 9 - #[derive( 10 - serde::Serialize, 11 - serde::Deserialize, 12 - Debug, 13 - Clone, 14 - PartialEq, 15 - Eq, 16 - jacquard_derive::IntoStatic 17 - )] 18 - #[serde(rename_all = "camelCase")] 19 - pub struct GetMetaOutput<'a> { 20 - #[serde(borrow)] 21 - pub software: jacquard_common::CowStr<'a>, 22 - #[serde(skip_serializing_if = "std::option::Option::is_none")] 23 - #[serde(borrow)] 24 - pub supported_extensions: std::option::Option<Vec<jacquard_common::CowStr<'a>>>, 25 - #[serde(borrow)] 26 - pub supported_lexicons: Vec<jacquard_common::CowStr<'a>>, 27 - #[serde(borrow)] 28 - pub version: jacquard_common::CowStr<'a>, 29 - } 30 - 31 - /// XRPC request marker type 32 - #[derive( 33 - Debug, 34 - Clone, 35 - Copy, 36 - PartialEq, 37 - Eq, 38 - serde::Serialize, 39 - serde::Deserialize, 40 - jacquard_derive::IntoStatic 41 - )] 42 - pub struct GetMeta; 43 - ///Response type for 44 - ///lol.skittr.server.getMeta 45 - pub struct GetMetaResponse; 46 - impl jacquard_common::xrpc::XrpcResp for GetMetaResponse { 47 - const NSID: &'static str = "lol.skittr.server.getMeta"; 48 - const ENCODING: &'static str = "application/json"; 49 - type Output<'de> = GetMetaOutput<'de>; 50 - type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 51 - } 52 - 53 - impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for GetMeta { 54 - const NSID: &'static str = "lol.skittr.server.getMeta"; 55 - const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 56 - type Response = GetMetaResponse; 57 - } 58 - 59 - ///Endpoint type for 60 - ///lol.skittr.server.getMeta 61 - pub struct GetMetaRequest; 62 - impl jacquard_common::xrpc::XrpcEndpoint for GetMetaRequest { 63 - const PATH: &'static str = "/xrpc/lol.skittr.server.getMeta"; 64 - const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 65 - type Request<'de> = GetMeta; 66 - type Response = GetMetaResponse; 67 - }
+90
crates/jacquard-api/src/my_skylights/list_item.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///User gave up on finishing the item 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Abandoned; 20 + impl std::fmt::Display for Abandoned { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "abandoned") 23 + } 24 + } 25 + 8 26 #[jacquard_derive::lexicon] 9 27 #[derive( 10 28 serde::Serialize, ··· 47 65 ListItemWishlist(Box<crate::my_skylights::list_item::Wishlist>), 48 66 } 49 67 68 + ///User is currently reading/watching/... the item 69 + #[derive( 70 + serde::Serialize, 71 + serde::Deserialize, 72 + Debug, 73 + Clone, 74 + PartialEq, 75 + Eq, 76 + Hash, 77 + jacquard_derive::IntoStatic 78 + )] 79 + pub struct InProgress; 80 + impl std::fmt::Display for InProgress { 81 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 82 + write!(f, "inProgress") 83 + } 84 + } 85 + 50 86 #[jacquard_derive::lexicon] 51 87 #[derive( 52 88 serde::Serialize, ··· 87 123 pub enum ListItemRecordList<'a> { 88 124 #[serde(rename = "my.skylights.list")] 89 125 List(Box<crate::my_skylights::list::List<'a>>), 126 + } 127 + 128 + ///User owns the item 129 + #[derive( 130 + serde::Serialize, 131 + serde::Deserialize, 132 + Debug, 133 + Clone, 134 + PartialEq, 135 + Eq, 136 + Hash, 137 + jacquard_derive::IntoStatic 138 + )] 139 + pub struct Owned; 140 + impl std::fmt::Display for Owned { 141 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 142 + write!(f, "owned") 143 + } 144 + } 145 + 146 + ///User plans to read/watch/... the item 147 + #[derive( 148 + serde::Serialize, 149 + serde::Deserialize, 150 + Debug, 151 + Clone, 152 + PartialEq, 153 + Eq, 154 + Hash, 155 + jacquard_derive::IntoStatic 156 + )] 157 + pub struct Queue; 158 + impl std::fmt::Display for Queue { 159 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 160 + write!(f, "queue") 161 + } 162 + } 163 + 164 + ///User wants to own the item 165 + #[derive( 166 + serde::Serialize, 167 + serde::Deserialize, 168 + Debug, 169 + Clone, 170 + PartialEq, 171 + Eq, 172 + Hash, 173 + jacquard_derive::IntoStatic 174 + )] 175 + pub struct Wishlist; 176 + impl std::fmt::Display for Wishlist { 177 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 178 + write!(f, "wishlist") 179 + } 90 180 }
+36
crates/jacquard-api/src/place_atwork/profile.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///Indicates the identity is available for hire 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Forhire; 20 + impl std::fmt::Display for Forhire { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "forhire") 23 + } 24 + } 25 + 26 + ///Indicates the identity is actively hiring 27 + #[derive( 28 + serde::Serialize, 29 + serde::Deserialize, 30 + Debug, 31 + Clone, 32 + PartialEq, 33 + Eq, 34 + Hash, 35 + jacquard_derive::IntoStatic 36 + )] 37 + pub struct Hiring; 38 + impl std::fmt::Display for Hiring { 39 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 40 + write!(f, "hiring") 41 + } 42 + } 43 + 8 44 ///A user profile for AT://Work.Place 9 45 #[jacquard_derive::lexicon] 10 46 #[derive(
+51
crates/jacquard-api/src/pub_leaflet/pages/linear_document.rs
··· 112 112 pub end: crate::pub_leaflet::pages::linear_document::Position<'a>, 113 113 #[serde(borrow)] 114 114 pub start: crate::pub_leaflet::pages::linear_document::Position<'a>, 115 + } 116 + 117 + #[derive( 118 + serde::Serialize, 119 + serde::Deserialize, 120 + Debug, 121 + Clone, 122 + PartialEq, 123 + Eq, 124 + Hash, 125 + jacquard_derive::IntoStatic 126 + )] 127 + pub struct TextAlignCenter; 128 + impl std::fmt::Display for TextAlignCenter { 129 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 130 + write!(f, "textAlignCenter") 131 + } 132 + } 133 + 134 + #[derive( 135 + serde::Serialize, 136 + serde::Deserialize, 137 + Debug, 138 + Clone, 139 + PartialEq, 140 + Eq, 141 + Hash, 142 + jacquard_derive::IntoStatic 143 + )] 144 + pub struct TextAlignLeft; 145 + impl std::fmt::Display for TextAlignLeft { 146 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 147 + write!(f, "textAlignLeft") 148 + } 149 + } 150 + 151 + #[derive( 152 + serde::Serialize, 153 + serde::Deserialize, 154 + Debug, 155 + Clone, 156 + PartialEq, 157 + Eq, 158 + Hash, 159 + jacquard_derive::IntoStatic 160 + )] 161 + pub struct TextAlignRight; 162 + impl std::fmt::Display for TextAlignRight { 163 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 164 + write!(f, "textAlignRight") 165 + } 115 166 }
+17
crates/jacquard-api/src/sh_tangled/repo/issue/state/closed.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///closed issue 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Closed; 20 + impl std::fmt::Display for Closed { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "main") 23 + } 24 + }
+17
crates/jacquard-api/src/sh_tangled/repo/issue/state/open.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///open issue 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Open; 20 + impl std::fmt::Display for Open { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "main") 23 + } 24 + }
+17
crates/jacquard-api/src/sh_tangled/repo/pull/status/closed.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///closed pull request 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Closed; 20 + impl std::fmt::Display for Closed { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "main") 23 + } 24 + }
+17
crates/jacquard-api/src/sh_tangled/repo/pull/status/merged.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///merged pull request 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Merged; 20 + impl std::fmt::Display for Merged { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "main") 23 + } 24 + }
+17
crates/jacquard-api/src/sh_tangled/repo/pull/status/open.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///open pull request 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct Open; 20 + impl std::fmt::Display for Open { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "main") 23 + } 24 + }
+3 -3
crates/jacquard-api/src/sh_weaver/embed/record_with_media.rs
··· 41 41 #[serde(rename = "sh.weaver.embed.external")] 42 42 External(Box<crate::sh_weaver::embed::external::ExternalRecord<'a>>), 43 43 #[serde(rename = "app.bsky.embed.images")] 44 - Images(Box<crate::app_bsky::embed::images::Images<'a>>), 44 + BskyImages(Box<crate::app_bsky::embed::images::Images<'a>>), 45 45 #[serde(rename = "app.bsky.embed.video")] 46 46 Video(Box<crate::app_bsky::embed::video::Video<'a>>), 47 47 #[serde(rename = "app.bsky.embed.external")] 48 - External(Box<crate::app_bsky::embed::external::ExternalRecord<'a>>), 48 + BskyExternal(Box<crate::app_bsky::embed::external::ExternalRecord<'a>>), 49 49 } 50 50 51 51 #[jacquard_derive::open_union] ··· 107 107 #[serde(rename = "app.bsky.embed.video#view")] 108 108 VideoView(Box<crate::app_bsky::embed::video::View<'a>>), 109 109 #[serde(rename = "app.bsky.embed.external#view")] 110 - ExternalView(Box<crate::app_bsky::embed::external::View<'a>>), 110 + BskyExternalView(Box<crate::app_bsky::embed::external::View<'a>>), 111 111 } 112 112 113 113 #[jacquard_derive::open_union]
+126
crates/jacquard-api/src/tools_ozone/moderation.rs
··· 1078 1078 pub takendown_record_count: i64, 1079 1079 } 1080 1080 1081 + ///Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator 1082 + #[derive( 1083 + serde::Serialize, 1084 + serde::Deserialize, 1085 + Debug, 1086 + Clone, 1087 + PartialEq, 1088 + Eq, 1089 + Hash, 1090 + jacquard_derive::IntoStatic 1091 + )] 1092 + pub struct ReviewClosed; 1093 + impl std::fmt::Display for ReviewClosed { 1094 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1095 + write!(f, "reviewClosed") 1096 + } 1097 + } 1098 + 1099 + ///Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator 1100 + #[derive( 1101 + serde::Serialize, 1102 + serde::Deserialize, 1103 + Debug, 1104 + Clone, 1105 + PartialEq, 1106 + Eq, 1107 + Hash, 1108 + jacquard_derive::IntoStatic 1109 + )] 1110 + pub struct ReviewEscalated; 1111 + impl std::fmt::Display for ReviewEscalated { 1112 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1113 + write!(f, "reviewEscalated") 1114 + } 1115 + } 1116 + 1117 + ///Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it 1118 + #[derive( 1119 + serde::Serialize, 1120 + serde::Deserialize, 1121 + Debug, 1122 + Clone, 1123 + PartialEq, 1124 + Eq, 1125 + Hash, 1126 + jacquard_derive::IntoStatic 1127 + )] 1128 + pub struct ReviewNone; 1129 + impl std::fmt::Display for ReviewNone { 1130 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1131 + write!(f, "reviewNone") 1132 + } 1133 + } 1134 + 1135 + ///Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator 1136 + #[derive( 1137 + serde::Serialize, 1138 + serde::Deserialize, 1139 + Debug, 1140 + Clone, 1141 + PartialEq, 1142 + Eq, 1143 + Hash, 1144 + jacquard_derive::IntoStatic 1145 + )] 1146 + pub struct ReviewOpen; 1147 + impl std::fmt::Display for ReviewOpen { 1148 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1149 + write!(f, "reviewOpen") 1150 + } 1151 + } 1152 + 1081 1153 ///Account credentials revocation by moderators. Only works on DID subjects. 1082 1154 #[jacquard_derive::lexicon] 1083 1155 #[derive( ··· 1435 1507 #[serde(tag = "$type")] 1436 1508 #[serde(bound(deserialize = "'de: 'a"))] 1437 1509 pub enum SubjectViewRecordProfile<'a> {} 1510 + ///Moderation event timeline event for a PLC create operation 1511 + #[derive( 1512 + serde::Serialize, 1513 + serde::Deserialize, 1514 + Debug, 1515 + Clone, 1516 + PartialEq, 1517 + Eq, 1518 + Hash, 1519 + jacquard_derive::IntoStatic 1520 + )] 1521 + pub struct TimelineEventPlcCreate; 1522 + impl std::fmt::Display for TimelineEventPlcCreate { 1523 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1524 + write!(f, "timelineEventPlcCreate") 1525 + } 1526 + } 1527 + 1528 + ///Moderation event timeline event for generic PLC operation 1529 + #[derive( 1530 + serde::Serialize, 1531 + serde::Deserialize, 1532 + Debug, 1533 + Clone, 1534 + PartialEq, 1535 + Eq, 1536 + Hash, 1537 + jacquard_derive::IntoStatic 1538 + )] 1539 + pub struct TimelineEventPlcOperation; 1540 + impl std::fmt::Display for TimelineEventPlcOperation { 1541 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1542 + write!(f, "timelineEventPlcOperation") 1543 + } 1544 + } 1545 + 1546 + ///Moderation event timeline event for a PLC tombstone operation 1547 + #[derive( 1548 + serde::Serialize, 1549 + serde::Deserialize, 1550 + Debug, 1551 + Clone, 1552 + PartialEq, 1553 + Eq, 1554 + Hash, 1555 + jacquard_derive::IntoStatic 1556 + )] 1557 + pub struct TimelineEventPlcTombstone; 1558 + impl std::fmt::Display for TimelineEventPlcTombstone { 1559 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1560 + write!(f, "timelineEventPlcTombstone") 1561 + } 1562 + } 1563 + 1438 1564 #[jacquard_derive::lexicon] 1439 1565 #[derive( 1440 1566 serde::Serialize,
+720
crates/jacquard-api/src/tools_ozone/report.rs
··· 5 5 // This file was automatically generated from Lexicon schemas. 6 6 // Any manual changes will be overwritten on the next regeneration. 7 7 8 + ///Appeal a previously taken moderation action 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + Hash, 17 + jacquard_derive::IntoStatic 18 + )] 19 + pub struct ReasonAppeal; 20 + impl std::fmt::Display for ReasonAppeal { 21 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 22 + write!(f, "reasonAppeal") 23 + } 24 + } 25 + 26 + ///Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority. 27 + #[derive( 28 + serde::Serialize, 29 + serde::Deserialize, 30 + Debug, 31 + Clone, 32 + PartialEq, 33 + Eq, 34 + Hash, 35 + jacquard_derive::IntoStatic 36 + )] 37 + pub struct ReasonChildSafetyCsam; 38 + impl std::fmt::Display for ReasonChildSafetyCsam { 39 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 40 + write!(f, "reasonChildSafetyCSAM") 41 + } 42 + } 43 + 44 + ///Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority. 45 + #[derive( 46 + serde::Serialize, 47 + serde::Deserialize, 48 + Debug, 49 + Clone, 50 + PartialEq, 51 + Eq, 52 + Hash, 53 + jacquard_derive::IntoStatic 54 + )] 55 + pub struct ReasonChildSafetyGroom; 56 + impl std::fmt::Display for ReasonChildSafetyGroom { 57 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 58 + write!(f, "reasonChildSafetyGroom") 59 + } 60 + } 61 + 62 + ///Harassment or bullying of minors 63 + #[derive( 64 + serde::Serialize, 65 + serde::Deserialize, 66 + Debug, 67 + Clone, 68 + PartialEq, 69 + Eq, 70 + Hash, 71 + jacquard_derive::IntoStatic 72 + )] 73 + pub struct ReasonChildSafetyHarassment; 74 + impl std::fmt::Display for ReasonChildSafetyHarassment { 75 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 76 + write!(f, "reasonChildSafetyHarassment") 77 + } 78 + } 79 + 80 + ///Other child safety. These reports will be sent only be sent to the application's Moderation Authority. 81 + #[derive( 82 + serde::Serialize, 83 + serde::Deserialize, 84 + Debug, 85 + Clone, 86 + PartialEq, 87 + Eq, 88 + Hash, 89 + jacquard_derive::IntoStatic 90 + )] 91 + pub struct ReasonChildSafetyOther; 92 + impl std::fmt::Display for ReasonChildSafetyOther { 93 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 94 + write!(f, "reasonChildSafetyOther") 95 + } 96 + } 97 + 98 + ///Privacy violation involving a minor 99 + #[derive( 100 + serde::Serialize, 101 + serde::Deserialize, 102 + Debug, 103 + Clone, 104 + PartialEq, 105 + Eq, 106 + Hash, 107 + jacquard_derive::IntoStatic 108 + )] 109 + pub struct ReasonChildSafetyPrivacy; 110 + impl std::fmt::Display for ReasonChildSafetyPrivacy { 111 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 112 + write!(f, "reasonChildSafetyPrivacy") 113 + } 114 + } 115 + 116 + ///Doxxing 117 + #[derive( 118 + serde::Serialize, 119 + serde::Deserialize, 120 + Debug, 121 + Clone, 122 + PartialEq, 123 + Eq, 124 + Hash, 125 + jacquard_derive::IntoStatic 126 + )] 127 + pub struct ReasonHarassmentDoxxing; 128 + impl std::fmt::Display for ReasonHarassmentDoxxing { 129 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 130 + write!(f, "reasonHarassmentDoxxing") 131 + } 132 + } 133 + 134 + ///Hate speech 135 + #[derive( 136 + serde::Serialize, 137 + serde::Deserialize, 138 + Debug, 139 + Clone, 140 + PartialEq, 141 + Eq, 142 + Hash, 143 + jacquard_derive::IntoStatic 144 + )] 145 + pub struct ReasonHarassmentHateSpeech; 146 + impl std::fmt::Display for ReasonHarassmentHateSpeech { 147 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 148 + write!(f, "reasonHarassmentHateSpeech") 149 + } 150 + } 151 + 152 + ///Other harassing or hateful content 153 + #[derive( 154 + serde::Serialize, 155 + serde::Deserialize, 156 + Debug, 157 + Clone, 158 + PartialEq, 159 + Eq, 160 + Hash, 161 + jacquard_derive::IntoStatic 162 + )] 163 + pub struct ReasonHarassmentOther; 164 + impl std::fmt::Display for ReasonHarassmentOther { 165 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 166 + write!(f, "reasonHarassmentOther") 167 + } 168 + } 169 + 170 + ///Targeted harassment 171 + #[derive( 172 + serde::Serialize, 173 + serde::Deserialize, 174 + Debug, 175 + Clone, 176 + PartialEq, 177 + Eq, 178 + Hash, 179 + jacquard_derive::IntoStatic 180 + )] 181 + pub struct ReasonHarassmentTargeted; 182 + impl std::fmt::Display for ReasonHarassmentTargeted { 183 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 184 + write!(f, "reasonHarassmentTargeted") 185 + } 186 + } 187 + 188 + ///Trolling 189 + #[derive( 190 + serde::Serialize, 191 + serde::Deserialize, 192 + Debug, 193 + Clone, 194 + PartialEq, 195 + Eq, 196 + Hash, 197 + jacquard_derive::IntoStatic 198 + )] 199 + pub struct ReasonHarassmentTroll; 200 + impl std::fmt::Display for ReasonHarassmentTroll { 201 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 202 + write!(f, "reasonHarassmentTroll") 203 + } 204 + } 205 + 206 + ///Fake account or bot 207 + #[derive( 208 + serde::Serialize, 209 + serde::Deserialize, 210 + Debug, 211 + Clone, 212 + PartialEq, 213 + Eq, 214 + Hash, 215 + jacquard_derive::IntoStatic 216 + )] 217 + pub struct ReasonMisleadingBot; 218 + impl std::fmt::Display for ReasonMisleadingBot { 219 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 220 + write!(f, "reasonMisleadingBot") 221 + } 222 + } 223 + 224 + ///False information about elections 225 + #[derive( 226 + serde::Serialize, 227 + serde::Deserialize, 228 + Debug, 229 + Clone, 230 + PartialEq, 231 + Eq, 232 + Hash, 233 + jacquard_derive::IntoStatic 234 + )] 235 + pub struct ReasonMisleadingElections; 236 + impl std::fmt::Display for ReasonMisleadingElections { 237 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 238 + write!(f, "reasonMisleadingElections") 239 + } 240 + } 241 + 242 + ///Impersonation 243 + #[derive( 244 + serde::Serialize, 245 + serde::Deserialize, 246 + Debug, 247 + Clone, 248 + PartialEq, 249 + Eq, 250 + Hash, 251 + jacquard_derive::IntoStatic 252 + )] 253 + pub struct ReasonMisleadingImpersonation; 254 + impl std::fmt::Display for ReasonMisleadingImpersonation { 255 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 256 + write!(f, "reasonMisleadingImpersonation") 257 + } 258 + } 259 + 260 + ///Other misleading content 261 + #[derive( 262 + serde::Serialize, 263 + serde::Deserialize, 264 + Debug, 265 + Clone, 266 + PartialEq, 267 + Eq, 268 + Hash, 269 + jacquard_derive::IntoStatic 270 + )] 271 + pub struct ReasonMisleadingOther; 272 + impl std::fmt::Display for ReasonMisleadingOther { 273 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 274 + write!(f, "reasonMisleadingOther") 275 + } 276 + } 277 + 278 + ///Scam 279 + #[derive( 280 + serde::Serialize, 281 + serde::Deserialize, 282 + Debug, 283 + Clone, 284 + PartialEq, 285 + Eq, 286 + Hash, 287 + jacquard_derive::IntoStatic 288 + )] 289 + pub struct ReasonMisleadingScam; 290 + impl std::fmt::Display for ReasonMisleadingScam { 291 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 292 + write!(f, "reasonMisleadingScam") 293 + } 294 + } 295 + 296 + ///Spam 297 + #[derive( 298 + serde::Serialize, 299 + serde::Deserialize, 300 + Debug, 301 + Clone, 302 + PartialEq, 303 + Eq, 304 + Hash, 305 + jacquard_derive::IntoStatic 306 + )] 307 + pub struct ReasonMisleadingSpam; 308 + impl std::fmt::Display for ReasonMisleadingSpam { 309 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 310 + write!(f, "reasonMisleadingSpam") 311 + } 312 + } 313 + 314 + ///An issue not included in these options 315 + #[derive( 316 + serde::Serialize, 317 + serde::Deserialize, 318 + Debug, 319 + Clone, 320 + PartialEq, 321 + Eq, 322 + Hash, 323 + jacquard_derive::IntoStatic 324 + )] 325 + pub struct ReasonOther; 326 + impl std::fmt::Display for ReasonOther { 327 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 328 + write!(f, "reasonOther") 329 + } 330 + } 331 + 332 + ///Banned user returning 333 + #[derive( 334 + serde::Serialize, 335 + serde::Deserialize, 336 + Debug, 337 + Clone, 338 + PartialEq, 339 + Eq, 340 + Hash, 341 + jacquard_derive::IntoStatic 342 + )] 343 + pub struct ReasonRuleBanEvasion; 344 + impl std::fmt::Display for ReasonRuleBanEvasion { 345 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 346 + write!(f, "reasonRuleBanEvasion") 347 + } 348 + } 349 + 350 + ///Other 351 + #[derive( 352 + serde::Serialize, 353 + serde::Deserialize, 354 + Debug, 355 + Clone, 356 + PartialEq, 357 + Eq, 358 + Hash, 359 + jacquard_derive::IntoStatic 360 + )] 361 + pub struct ReasonRuleOther; 362 + impl std::fmt::Display for ReasonRuleOther { 363 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 364 + write!(f, "reasonRuleOther") 365 + } 366 + } 367 + 368 + ///Promoting or selling prohibited items or services 369 + #[derive( 370 + serde::Serialize, 371 + serde::Deserialize, 372 + Debug, 373 + Clone, 374 + PartialEq, 375 + Eq, 376 + Hash, 377 + jacquard_derive::IntoStatic 378 + )] 379 + pub struct ReasonRuleProhibitedSales; 380 + impl std::fmt::Display for ReasonRuleProhibitedSales { 381 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 382 + write!(f, "reasonRuleProhibitedSales") 383 + } 384 + } 385 + 386 + ///Hacking or system attacks 387 + #[derive( 388 + serde::Serialize, 389 + serde::Deserialize, 390 + Debug, 391 + Clone, 392 + PartialEq, 393 + Eq, 394 + Hash, 395 + jacquard_derive::IntoStatic 396 + )] 397 + pub struct ReasonRuleSiteSecurity; 398 + impl std::fmt::Display for ReasonRuleSiteSecurity { 399 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 400 + write!(f, "reasonRuleSiteSecurity") 401 + } 402 + } 403 + 404 + ///Content promoting or depicting self-harm 405 + #[derive( 406 + serde::Serialize, 407 + serde::Deserialize, 408 + Debug, 409 + Clone, 410 + PartialEq, 411 + Eq, 412 + Hash, 413 + jacquard_derive::IntoStatic 414 + )] 415 + pub struct ReasonSelfHarmContent; 416 + impl std::fmt::Display for ReasonSelfHarmContent { 417 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 418 + write!(f, "reasonSelfHarmContent") 419 + } 420 + } 421 + 422 + ///Eating disorders 423 + #[derive( 424 + serde::Serialize, 425 + serde::Deserialize, 426 + Debug, 427 + Clone, 428 + PartialEq, 429 + Eq, 430 + Hash, 431 + jacquard_derive::IntoStatic 432 + )] 433 + pub struct ReasonSelfHarmEd; 434 + impl std::fmt::Display for ReasonSelfHarmEd { 435 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 436 + write!(f, "reasonSelfHarmED") 437 + } 438 + } 439 + 440 + ///Other dangerous content 441 + #[derive( 442 + serde::Serialize, 443 + serde::Deserialize, 444 + Debug, 445 + Clone, 446 + PartialEq, 447 + Eq, 448 + Hash, 449 + jacquard_derive::IntoStatic 450 + )] 451 + pub struct ReasonSelfHarmOther; 452 + impl std::fmt::Display for ReasonSelfHarmOther { 453 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 454 + write!(f, "reasonSelfHarmOther") 455 + } 456 + } 457 + 458 + ///Dangerous challenges or activities 459 + #[derive( 460 + serde::Serialize, 461 + serde::Deserialize, 462 + Debug, 463 + Clone, 464 + PartialEq, 465 + Eq, 466 + Hash, 467 + jacquard_derive::IntoStatic 468 + )] 469 + pub struct ReasonSelfHarmStunts; 470 + impl std::fmt::Display for ReasonSelfHarmStunts { 471 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 472 + write!(f, "reasonSelfHarmStunts") 473 + } 474 + } 475 + 476 + ///Dangerous substances or drug abuse 477 + #[derive( 478 + serde::Serialize, 479 + serde::Deserialize, 480 + Debug, 481 + Clone, 482 + PartialEq, 483 + Eq, 484 + Hash, 485 + jacquard_derive::IntoStatic 486 + )] 487 + pub struct ReasonSelfHarmSubstances; 488 + impl std::fmt::Display for ReasonSelfHarmSubstances { 489 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 490 + write!(f, "reasonSelfHarmSubstances") 491 + } 492 + } 493 + 494 + ///Adult sexual abuse content 495 + #[derive( 496 + serde::Serialize, 497 + serde::Deserialize, 498 + Debug, 499 + Clone, 500 + PartialEq, 501 + Eq, 502 + Hash, 503 + jacquard_derive::IntoStatic 504 + )] 505 + pub struct ReasonSexualAbuseContent; 506 + impl std::fmt::Display for ReasonSexualAbuseContent { 507 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 508 + write!(f, "reasonSexualAbuseContent") 509 + } 510 + } 511 + 512 + ///Animal sexual abuse 513 + #[derive( 514 + serde::Serialize, 515 + serde::Deserialize, 516 + Debug, 517 + Clone, 518 + PartialEq, 519 + Eq, 520 + Hash, 521 + jacquard_derive::IntoStatic 522 + )] 523 + pub struct ReasonSexualAnimal; 524 + impl std::fmt::Display for ReasonSexualAnimal { 525 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 526 + write!(f, "reasonSexualAnimal") 527 + } 528 + } 529 + 530 + ///Deepfake adult content 531 + #[derive( 532 + serde::Serialize, 533 + serde::Deserialize, 534 + Debug, 535 + Clone, 536 + PartialEq, 537 + Eq, 538 + Hash, 539 + jacquard_derive::IntoStatic 540 + )] 541 + pub struct ReasonSexualDeepfake; 542 + impl std::fmt::Display for ReasonSexualDeepfake { 543 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 544 + write!(f, "reasonSexualDeepfake") 545 + } 546 + } 547 + 548 + ///Non-consensual intimate imagery 549 + #[derive( 550 + serde::Serialize, 551 + serde::Deserialize, 552 + Debug, 553 + Clone, 554 + PartialEq, 555 + Eq, 556 + Hash, 557 + jacquard_derive::IntoStatic 558 + )] 559 + pub struct ReasonSexualNcii; 560 + impl std::fmt::Display for ReasonSexualNcii { 561 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 562 + write!(f, "reasonSexualNCII") 563 + } 564 + } 565 + 566 + ///Other sexual violence content 567 + #[derive( 568 + serde::Serialize, 569 + serde::Deserialize, 570 + Debug, 571 + Clone, 572 + PartialEq, 573 + Eq, 574 + Hash, 575 + jacquard_derive::IntoStatic 576 + )] 577 + pub struct ReasonSexualOther; 578 + impl std::fmt::Display for ReasonSexualOther { 579 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 580 + write!(f, "reasonSexualOther") 581 + } 582 + } 583 + 584 + ///Unlabelled adult content 585 + #[derive( 586 + serde::Serialize, 587 + serde::Deserialize, 588 + Debug, 589 + Clone, 590 + PartialEq, 591 + Eq, 592 + Hash, 593 + jacquard_derive::IntoStatic 594 + )] 595 + pub struct ReasonSexualUnlabeled; 596 + impl std::fmt::Display for ReasonSexualUnlabeled { 597 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 598 + write!(f, "reasonSexualUnlabeled") 599 + } 600 + } 601 + 8 602 #[derive(Debug, Clone, PartialEq, Eq, Hash)] 9 603 pub enum ReasonType<'a> { 10 604 ToolsOzoneReportDefsReasonAppeal, ··· 588 1182 } 589 1183 ReasonType::Other(v) => ReasonType::Other(v.into_static()), 590 1184 } 1185 + } 1186 + } 1187 + 1188 + ///Animal welfare violations 1189 + #[derive( 1190 + serde::Serialize, 1191 + serde::Deserialize, 1192 + Debug, 1193 + Clone, 1194 + PartialEq, 1195 + Eq, 1196 + Hash, 1197 + jacquard_derive::IntoStatic 1198 + )] 1199 + pub struct ReasonViolenceAnimal; 1200 + impl std::fmt::Display for ReasonViolenceAnimal { 1201 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1202 + write!(f, "reasonViolenceAnimal") 1203 + } 1204 + } 1205 + 1206 + ///Extremist content. These reports will be sent only be sent to the application's Moderation Authority. 1207 + #[derive( 1208 + serde::Serialize, 1209 + serde::Deserialize, 1210 + Debug, 1211 + Clone, 1212 + PartialEq, 1213 + Eq, 1214 + Hash, 1215 + jacquard_derive::IntoStatic 1216 + )] 1217 + pub struct ReasonViolenceExtremistContent; 1218 + impl std::fmt::Display for ReasonViolenceExtremistContent { 1219 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1220 + write!(f, "reasonViolenceExtremistContent") 1221 + } 1222 + } 1223 + 1224 + ///Glorification of violence 1225 + #[derive( 1226 + serde::Serialize, 1227 + serde::Deserialize, 1228 + Debug, 1229 + Clone, 1230 + PartialEq, 1231 + Eq, 1232 + Hash, 1233 + jacquard_derive::IntoStatic 1234 + )] 1235 + pub struct ReasonViolenceGlorification; 1236 + impl std::fmt::Display for ReasonViolenceGlorification { 1237 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1238 + write!(f, "reasonViolenceGlorification") 1239 + } 1240 + } 1241 + 1242 + ///Graphic violent content 1243 + #[derive( 1244 + serde::Serialize, 1245 + serde::Deserialize, 1246 + Debug, 1247 + Clone, 1248 + PartialEq, 1249 + Eq, 1250 + Hash, 1251 + jacquard_derive::IntoStatic 1252 + )] 1253 + pub struct ReasonViolenceGraphicContent; 1254 + impl std::fmt::Display for ReasonViolenceGraphicContent { 1255 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1256 + write!(f, "reasonViolenceGraphicContent") 1257 + } 1258 + } 1259 + 1260 + ///Other violent content 1261 + #[derive( 1262 + serde::Serialize, 1263 + serde::Deserialize, 1264 + Debug, 1265 + Clone, 1266 + PartialEq, 1267 + Eq, 1268 + Hash, 1269 + jacquard_derive::IntoStatic 1270 + )] 1271 + pub struct ReasonViolenceOther; 1272 + impl std::fmt::Display for ReasonViolenceOther { 1273 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1274 + write!(f, "reasonViolenceOther") 1275 + } 1276 + } 1277 + 1278 + ///Threats or incitement 1279 + #[derive( 1280 + serde::Serialize, 1281 + serde::Deserialize, 1282 + Debug, 1283 + Clone, 1284 + PartialEq, 1285 + Eq, 1286 + Hash, 1287 + jacquard_derive::IntoStatic 1288 + )] 1289 + pub struct ReasonViolenceThreats; 1290 + impl std::fmt::Display for ReasonViolenceThreats { 1291 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1292 + write!(f, "reasonViolenceThreats") 1293 + } 1294 + } 1295 + 1296 + ///Human trafficking 1297 + #[derive( 1298 + serde::Serialize, 1299 + serde::Deserialize, 1300 + Debug, 1301 + Clone, 1302 + PartialEq, 1303 + Eq, 1304 + Hash, 1305 + jacquard_derive::IntoStatic 1306 + )] 1307 + pub struct ReasonViolenceTrafficking; 1308 + impl std::fmt::Display for ReasonViolenceTrafficking { 1309 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 1310 + write!(f, "reasonViolenceTrafficking") 591 1311 } 592 1312 }
+72
crates/jacquard-api/src/tools_ozone/team.rs
··· 38 38 pub role: jacquard_common::CowStr<'a>, 39 39 #[serde(skip_serializing_if = "std::option::Option::is_none")] 40 40 pub updated_at: std::option::Option<jacquard_common::types::string::Datetime>, 41 + } 42 + 43 + ///Admin role. Highest level of access, can perform all actions. 44 + #[derive( 45 + serde::Serialize, 46 + serde::Deserialize, 47 + Debug, 48 + Clone, 49 + PartialEq, 50 + Eq, 51 + Hash, 52 + jacquard_derive::IntoStatic 53 + )] 54 + pub struct RoleAdmin; 55 + impl std::fmt::Display for RoleAdmin { 56 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 57 + write!(f, "roleAdmin") 58 + } 59 + } 60 + 61 + ///Moderator role. Can perform most actions. 62 + #[derive( 63 + serde::Serialize, 64 + serde::Deserialize, 65 + Debug, 66 + Clone, 67 + PartialEq, 68 + Eq, 69 + Hash, 70 + jacquard_derive::IntoStatic 71 + )] 72 + pub struct RoleModerator; 73 + impl std::fmt::Display for RoleModerator { 74 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 75 + write!(f, "roleModerator") 76 + } 77 + } 78 + 79 + ///Triage role. Mostly intended for monitoring and escalating issues. 80 + #[derive( 81 + serde::Serialize, 82 + serde::Deserialize, 83 + Debug, 84 + Clone, 85 + PartialEq, 86 + Eq, 87 + Hash, 88 + jacquard_derive::IntoStatic 89 + )] 90 + pub struct RoleTriage; 91 + impl std::fmt::Display for RoleTriage { 92 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 93 + write!(f, "roleTriage") 94 + } 95 + } 96 + 97 + ///Verifier role. Only allowed to issue verifications. 98 + #[derive( 99 + serde::Serialize, 100 + serde::Deserialize, 101 + Debug, 102 + Clone, 103 + PartialEq, 104 + Eq, 105 + Hash, 106 + jacquard_derive::IntoStatic 107 + )] 108 + pub struct RoleVerifier; 109 + impl std::fmt::Display for RoleVerifier { 110 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 111 + write!(f, "roleVerifier") 112 + } 41 113 }
+3 -3
crates/jacquard-axum/Cargo.toml
··· 1 1 [package] 2 2 name = "jacquard-axum" 3 3 edition.workspace = true 4 - version.workspace = true 4 + version = "0.4.0" 5 5 authors.workspace = true 6 6 repository.workspace = true 7 7 keywords.workspace = true ··· 24 24 axum = "0.8.6" 25 25 axum-macros = "0.5.0" 26 26 bytes.workspace = true 27 - jacquard = { version = "0.3.0", path = "../jacquard" } 28 - jacquard-common = { version = "0.3.0", path = "../jacquard-common", features = ["reqwest-client"] } 27 + jacquard = { version = "*", path = "../jacquard" } 28 + jacquard-common = { version = "*", path = "../jacquard-common", features = ["reqwest-client"] } 29 29 miette.workspace = true 30 30 serde.workspace = true 31 31 serde_html_form.workspace = true
+1 -1
crates/jacquard-common/Cargo.toml
··· 2 2 name = "jacquard-common" 3 3 description = "Core AT Protocol types and utilities for Jacquard" 4 4 edition.workspace = true 5 - version.workspace = true 5 + version = "0.4.0" 6 6 authors.workspace = true 7 7 repository.workspace = true 8 8 keywords.workspace = true
+13 -10
crates/jacquard-common/src/types/value/convert.rs
··· 1 + use crate::IntoStatic; 1 2 use crate::types::{ 2 3 DataModelType, 3 4 cid::Cid, 4 5 string::AtprotoStr, 5 6 value::{Array, Data, Object, RawData, parsing}, 6 7 }; 7 - use crate::{CowStr, IntoStatic}; 8 8 use bytes::Bytes; 9 - use core::{any::TypeId, fmt}; 9 + use core::any::TypeId; 10 10 use smol_str::SmolStr; 11 11 use std::{borrow::ToOwned, boxed::Box, collections::BTreeMap, vec::Vec}; 12 12 ··· 282 282 if let Some(RawData::String(type_str)) = map.get("$type") { 283 283 if parsing::infer_from_type(type_str) == DataModelType::Blob { 284 284 // Try to parse as blob 285 - if let (Some(RawData::CidLink(cid)), Some(RawData::String(mime)), Some(size)) = ( 286 - map.get("ref"), 287 - map.get("mimeType"), 288 - map.get("size") 289 - ) { 285 + if let ( 286 + Some(RawData::CidLink(cid)), 287 + Some(RawData::String(mime)), 288 + Some(size), 289 + ) = (map.get("ref"), map.get("mimeType"), map.get("size")) 290 + { 290 291 let size_val = match size { 291 292 RawData::UnsignedInt(u) => *u as usize, 292 293 RawData::SignedInt(i) => *i as usize, 293 - _ => return Err(ConversionError::InvalidRawData { 294 - message: "blob size must be integer".to_string(), 295 - }), 294 + _ => { 295 + return Err(ConversionError::InvalidRawData { 296 + message: "blob size must be integer".to_string(), 297 + }); 298 + } 296 299 }; 297 300 return Ok(Data::Blob(crate::types::blob::Blob { 298 301 r#ref: cid.clone(),
+3 -6
crates/jacquard-common/src/types/value/serde_impl.rs
··· 1135 1135 } 1136 1136 } 1137 1137 1138 - // ======================================================================== 1139 - // SERIALIZER IMPLEMENTATION - Serializing to RawData 1140 - // ======================================================================== 1141 - 1142 1138 /// Error type for RawData serialization 1143 1139 #[derive(Debug)] 1144 1140 pub enum RawDataSerializerError { 1141 + /// Error message 1145 1142 Message(String), 1146 1143 } 1147 1144 ··· 1344 1341 } 1345 1342 } 1346 1343 1347 - // Sequence serializer accumulator 1344 + /// Sequence serializer accumulator 1348 1345 pub struct RawDataSeqSerializer { 1349 1346 items: Vec<RawData<'static>>, 1350 1347 } ··· 1414 1411 } 1415 1412 } 1416 1413 1417 - // Map serializer accumulator 1414 + /// Map serializer accumulator 1418 1415 pub struct RawDataMapSerializer { 1419 1416 map: BTreeMap<SmolStr, RawData<'static>>, 1420 1417 next_key: Option<SmolStr>,
+18 -7
crates/jacquard-common/src/xrpc.rs
··· 127 127 type Err<'de>: Error + Deserialize<'de> + IntoStatic; 128 128 } 129 129 130 + /// XRPC server endpoint trait 131 + /// 132 + /// Defines the fully-qualified path and method, as well as request and response types 133 + /// This exists primarily to work around lifetime issues for crates like Axum 134 + /// by moving the lifetime from the trait itself into an associated type. 135 + /// 136 + /// It is implemented by the code generation on a marker struct, like the client-side [XrpcResp] trait. 137 + pub trait XrpcEndpoint { 138 + /// Fully-qualified path ('/xrpc/[nsid]') where this endpoint should live on the server 139 + const PATH: &'static str; 140 + /// XRPC method (query/GET or procedure/POST) 141 + const METHOD: XrpcMethod; 142 + /// XRPC Request data type 143 + type Request<'de>: XrpcRequest<'de> + IntoStatic; 144 + /// XRPC Response data type 145 + type Response: XrpcResp; 146 + } 147 + 130 148 /// Error type for XRPC endpoints that don't define any errors 131 149 #[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] 132 150 pub struct GenericError<'a>(#[serde(borrow)] Data<'a>); ··· 481 499 builder 482 500 .body(body) 483 501 .map_err(|e| TransportError::InvalidRequest(e.to_string())) 484 - } 485 - 486 - pub trait XrpcEndpoint { 487 - const PATH: &'static str; 488 - const METHOD: XrpcMethod; 489 - type Request<'de>: XrpcRequest<'de> + IntoStatic; 490 - type Response: XrpcResp; 491 502 } 492 503 493 504 /// XRPC response wrapper that owns the response buffer
+1 -1
crates/jacquard-derive/Cargo.toml
··· 28 28 29 29 30 30 [dev-dependencies] 31 - jacquard-common = { version = "0.3.0", path = "../jacquard-common" } 31 + jacquard-common = { version = "*", path = "../jacquard-common" }
+4 -4
crates/jacquard-identity/Cargo.toml
··· 1 1 [package] 2 2 name = "jacquard-identity" 3 3 edition.workspace = true 4 - version.workspace = true 4 + version = "0.3.1" 5 5 authors.workspace = true 6 6 repository.workspace = true 7 7 keywords.workspace = true ··· 10 10 exclude.workspace = true 11 11 homepage.workspace = true 12 12 license.workspace = true 13 - description.workspace = true 13 + description = "ATProto identity resolution utilities for Jacquard" 14 14 15 15 [features] 16 16 dns = ["dep:hickory-resolver"] ··· 19 19 async-trait.workspace = true 20 20 bon.workspace = true 21 21 bytes.workspace = true 22 - jacquard-common = { version = "0.3", path = "../jacquard-common", features = ["reqwest-client"] } 22 + jacquard-common = { version = "*", path = "../jacquard-common", features = ["reqwest-client"] } 23 + jacquard-api = { version = "*", path = "../jacquard-api" } 23 24 percent-encoding.workspace = true 24 25 reqwest.workspace = true 25 26 url.workspace = true ··· 30 31 thiserror.workspace = true 31 32 miette.workspace = true 32 33 http.workspace = true 33 - jacquard-api = { version = "0.3.0", path = "../jacquard-api" } 34 34 serde_html_form.workspace = true 35 35 urlencoding.workspace = true
+3 -3
crates/jacquard-lexicon/Cargo.toml
··· 25 25 glob = "0.3" 26 26 heck.workspace = true 27 27 itertools.workspace = true 28 - jacquard-api = { version = "0.3.0", path = "../jacquard-api" } 29 - jacquard-common = { version = "0.3.0", path = "../jacquard-common" } 30 - jacquard-identity = { version = "0.3.0", path = "../jacquard-identity" } 28 + jacquard-api = { version = "*", path = "../jacquard-api" } 29 + jacquard-common = { version = "*", path = "../jacquard-common" } 30 + jacquard-identity = { version = "*", path = "../jacquard-identity" } 31 31 kdl = "6" 32 32 miette = { workspace = true, features = ["fancy"] } 33 33 prettyplease.workspace = true
+33
crates/jacquard-lexicon/src/bin/lex_fetch.rs
··· 78 78 codegen.write_to_disk(&config.output.codegen_dir)?; 79 79 80 80 println!("Generated code to {:?}", config.output.codegen_dir); 81 + 82 + // Update Cargo.toml features if cargo_toml_path is specified 83 + if let Some(cargo_toml_path) = &config.output.cargo_toml_path { 84 + if args.verbose { 85 + println!("Updating Cargo.toml features..."); 86 + } 87 + 88 + update_cargo_features(&codegen, cargo_toml_path, &config.output.codegen_dir)?; 89 + println!("Updated features in {:?}", cargo_toml_path); 90 + } 81 91 } else { 82 92 println!("Lexicons written to {:?}", config.output.lexicons_dir); 83 93 } 84 94 85 95 Ok(()) 86 96 } 97 + 98 + fn update_cargo_features(codegen: &CodeGenerator, cargo_toml_path: &PathBuf, codegen_dir: &PathBuf) -> Result<()> { 99 + // Read existing Cargo.toml 100 + let content = std::fs::read_to_string(cargo_toml_path).into_diagnostic()?; 101 + 102 + // Find the "# --- generated ---" marker 103 + const MARKER: &str = "# --- generated ---"; 104 + 105 + let (before, _after) = content.split_once(MARKER) 106 + .ok_or_else(|| miette::miette!("Cargo.toml missing '{}' marker", MARKER))?; 107 + 108 + // Generate new features, passing lib.rs path to detect existing modules 109 + let lib_rs_path = codegen_dir.join("lib.rs"); 110 + let features = codegen.generate_cargo_features(Some(&lib_rs_path)); 111 + 112 + // Reconstruct file 113 + let new_content = format!("{}{}\n{}", before, MARKER, features); 114 + 115 + // Write back 116 + std::fs::write(cargo_toml_path, new_content).into_diagnostic()?; 117 + 118 + Ok(()) 119 + }
+232 -23
crates/jacquard-lexicon/src/codegen.rs
··· 78 78 pub struct CodeGenerator<'c> { 79 79 corpus: &'c LexiconCorpus, 80 80 root_module: String, 81 + /// Track namespace dependencies (namespace -> set of namespaces it depends on) 82 + namespace_deps: 83 + std::cell::RefCell<std::collections::HashMap<String, std::collections::HashSet<String>>>, 81 84 } 82 85 83 86 impl<'c> CodeGenerator<'c> { ··· 86 89 Self { 87 90 corpus, 88 91 root_module: root_module.into(), 92 + namespace_deps: std::cell::RefCell::new(std::collections::HashMap::new()), 89 93 } 90 94 } 91 95 ··· 101 105 LexUserType::Object(obj) => self.generate_object(nsid, def_name, obj), 102 106 LexUserType::XrpcQuery(query) => self.generate_query(nsid, def_name, query), 103 107 LexUserType::XrpcProcedure(proc) => self.generate_procedure(nsid, def_name, proc), 104 - LexUserType::Token(_) => { 105 - // Token types are marker types used in knownValues enums. 106 - // We don't generate anything for them - the knownValues enum 107 - // is the actual type that gets used. 108 - Ok(quote! {}) 108 + LexUserType::Token(token) => { 109 + // Token types are marker structs that can be used as union refs 110 + let type_name = self.def_to_type_name(nsid, def_name); 111 + let ident = syn::Ident::new(&type_name, proc_macro2::Span::call_site()); 112 + let doc = self.generate_doc_comment(token.description.as_ref()); 113 + 114 + // Token name for Display impl (just the def name, not the full ref) 115 + let token_name = def_name; 116 + 117 + Ok(quote! { 118 + #doc 119 + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic)] 120 + pub struct #ident; 121 + 122 + impl std::fmt::Display for #ident { 123 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 124 + write!(f, #token_name) 125 + } 126 + } 127 + }) 109 128 } 110 129 LexUserType::String(s) if s.known_values.is_some() => { 111 130 self.generate_known_values_enum(nsid, def_name, s) ··· 220 239 // Clone refs to avoid lifetime issues 221 240 let refs: Vec<_> = union.refs.iter().cloned().collect(); 222 241 let union_def = 223 - self.generate_union(&union_name, &refs, None, union.closed)?; 242 + self.generate_union(nsid, &union_name, &refs, None, union.closed)?; 224 243 unions.push(union_def); 225 244 } 226 245 LexObjectProperty::Object(nested_obj) => { ··· 287 306 LexObjectProperty::Union(union) => { 288 307 let union_name = format!("{}Record{}", type_name, field_name.to_pascal_case()); 289 308 let refs: Vec<_> = union.refs.iter().cloned().collect(); 290 - let union_def = self.generate_union(&union_name, &refs, None, union.closed)?; 309 + let union_def = 310 + self.generate_union(nsid, &union_name, &refs, None, union.closed)?; 291 311 unions.push(union_def); 292 312 } 293 313 LexObjectProperty::Object(nested_obj) => { ··· 742 762 } 743 763 744 764 if let Some(body) = &query.output { 745 - let output_struct = self.generate_output_struct(&type_base, body)?; 765 + let output_struct = self.generate_output_struct(nsid, &type_base, body)?; 746 766 output.push(output_struct); 747 767 } 748 768 ··· 805 825 } 806 826 807 827 if let Some(body) = &proc.input { 808 - let input_struct = self.generate_input_struct(&type_base, body)?; 828 + let input_struct = self.generate_input_struct(nsid, &type_base, body)?; 809 829 output.push(input_struct); 810 830 } 811 831 812 832 if let Some(body) = &proc.output { 813 - let output_struct = self.generate_output_struct(&type_base, body)?; 833 + let output_struct = self.generate_output_struct(nsid, &type_base, body)?; 814 834 output.push(output_struct); 815 835 } 816 836 ··· 870 890 871 891 if let Some(message) = &sub.message { 872 892 if let Some(schema) = &message.schema { 873 - let message_type = self.generate_subscription_message(&type_base, schema)?; 893 + let message_type = self.generate_subscription_message(nsid, &type_base, schema)?; 874 894 output.push(message_type); 875 895 } 876 896 } ··· 887 907 888 908 fn generate_subscription_message( 889 909 &self, 910 + nsid: &str, 890 911 type_base: &str, 891 912 schema: &LexXrpcSubscriptionMessageSchema<'static>, 892 913 ) -> Result<TokenStream> { ··· 992 1013 format!("{}Record{}", struct_name, field_name.to_pascal_case()); 993 1014 let refs: Vec<_> = union.refs.iter().cloned().collect(); 994 1015 let union_def = 995 - self.generate_union(&union_name, &refs, None, union.closed)?; 1016 + self.generate_union(nsid, &union_name, &refs, None, union.closed)?; 996 1017 unions.push(union_def); 997 1018 } 998 1019 } ··· 1545 1566 /// Generate input struct from XRPC body 1546 1567 fn generate_input_struct( 1547 1568 &self, 1569 + nsid: &str, 1548 1570 type_base: &str, 1549 1571 body: &LexXrpcBody<'static>, 1550 1572 ) -> Result<TokenStream> { ··· 1604 1626 if let LexObjectProperty::Union(union) = field_type { 1605 1627 let union_name = format!("{}Record{}", type_base, field_name.to_pascal_case()); 1606 1628 let refs: Vec<_> = union.refs.iter().cloned().collect(); 1607 - let union_def = self.generate_union(&union_name, &refs, None, union.closed)?; 1629 + let union_def = 1630 + self.generate_union(nsid, &union_name, &refs, None, union.closed)?; 1608 1631 unions.push(union_def); 1609 1632 } 1610 1633 } ··· 1648 1671 /// Generate output struct from XRPC body 1649 1672 fn generate_output_struct( 1650 1673 &self, 1674 + nsid: &str, 1651 1675 type_base: &str, 1652 1676 body: &LexXrpcBody<'static>, 1653 1677 ) -> Result<TokenStream> { ··· 1682 1706 let union_name = 1683 1707 format!("{}Record{}", struct_name, field_name.to_pascal_case()); 1684 1708 let refs: Vec<_> = union.refs.iter().cloned().collect(); 1685 - let union_def = self.generate_union(&union_name, &refs, None, union.closed)?; 1709 + let union_def = 1710 + self.generate_union(nsid, &union_name, &refs, None, union.closed)?; 1686 1711 unions.push(union_def); 1687 1712 } 1688 1713 } ··· 2245 2270 /// Generate a union enum 2246 2271 pub fn generate_union( 2247 2272 &self, 2273 + current_nsid: &str, 2248 2274 union_name: &str, 2249 2275 refs: &[jacquard_common::CowStr<'static>], 2250 2276 description: Option<&str>, ··· 2252 2278 ) -> Result<TokenStream> { 2253 2279 let enum_ident = syn::Ident::new(union_name, proc_macro2::Span::call_site()); 2254 2280 2255 - let mut variants = Vec::new(); 2281 + // Extract namespace prefix from current NSID (first two segments: "sh.weaver" from "sh.weaver.embed.recordWithMedia") 2282 + let parts: Vec<_> = current_nsid.splitn(3, '.').collect(); 2283 + let current_namespace = if parts.len() >= 2 { 2284 + format!("{}.{}", parts[0], parts[1]) 2285 + } else { 2286 + current_nsid.to_string() 2287 + }; 2288 + 2289 + // First pass: collect all variant names and detect collisions 2290 + #[derive(Debug)] 2291 + struct VariantInfo<'a> { 2292 + ref_str: &'a str, 2293 + ref_nsid: &'a str, 2294 + simple_name: String, 2295 + is_current_namespace: bool, 2296 + } 2297 + 2298 + let mut variant_infos = Vec::new(); 2256 2299 for ref_str in refs { 2257 2300 // Parse ref to get NSID and def name 2258 2301 let (ref_nsid, ref_def) = if let Some((nsid, fragment)) = ref_str.split_once('#') { ··· 2266 2309 continue; 2267 2310 } 2268 2311 2269 - // Generate variant name from def name (or last NSID segment if main) 2270 - // For non-main refs, include the last NSID segment to avoid collisions 2271 - // e.g. app.bsky.embed.images#view -> ImagesView 2272 - // app.bsky.embed.video#view -> VideoView 2273 - let variant_name = if ref_def == "main" { 2312 + // Check if ref is in current namespace 2313 + let is_current_namespace = ref_nsid.starts_with(&current_namespace); 2314 + 2315 + // Generate simple variant name (without namespace prefix) 2316 + let simple_name = if ref_def == "main" { 2274 2317 ref_nsid.split('.').last().unwrap().to_pascal_case() 2275 2318 } else { 2276 2319 let last_segment = ref_nsid.split('.').last().unwrap().to_pascal_case(); 2277 2320 format!("{}{}", last_segment, ref_def.to_pascal_case()) 2278 2321 }; 2322 + 2323 + variant_infos.push(VariantInfo { 2324 + ref_str: ref_str.as_ref(), 2325 + ref_nsid, 2326 + simple_name, 2327 + is_current_namespace, 2328 + }); 2329 + } 2330 + 2331 + // Second pass: detect collisions and disambiguate 2332 + use std::collections::HashMap; 2333 + let mut name_counts: HashMap<String, usize> = HashMap::new(); 2334 + for info in &variant_infos { 2335 + *name_counts.entry(info.simple_name.clone()).or_insert(0) += 1; 2336 + } 2337 + 2338 + let mut variants = Vec::new(); 2339 + for info in variant_infos { 2340 + let has_collision = name_counts.get(&info.simple_name).copied().unwrap_or(0) > 1; 2341 + 2342 + // Track namespace dependency for foreign refs 2343 + if !info.is_current_namespace { 2344 + let parts: Vec<_> = info.ref_nsid.splitn(3, '.').collect(); 2345 + let foreign_namespace = if parts.len() >= 2 { 2346 + format!("{}.{}", parts[0], parts[1]) 2347 + } else { 2348 + info.ref_nsid.to_string() 2349 + }; 2350 + self.namespace_deps 2351 + .borrow_mut() 2352 + .entry(current_namespace.clone()) 2353 + .or_default() 2354 + .insert(foreign_namespace); 2355 + } 2356 + 2357 + // Disambiguate: add second NSID segment prefix only to foreign refs when there's a collision 2358 + let variant_name = if has_collision && !info.is_current_namespace { 2359 + // Get second segment (namespace identifier: "bsky" from "app.bsky.embed.images") 2360 + let segments: Vec<&str> = info.ref_nsid.split('.').collect(); 2361 + let prefix = if segments.len() >= 2 { 2362 + segments[1].to_pascal_case() 2363 + } else { 2364 + // Fallback: use first segment if only one exists 2365 + segments[0].to_pascal_case() 2366 + }; 2367 + format!("{}{}", prefix, info.simple_name) 2368 + } else { 2369 + info.simple_name.clone() 2370 + }; 2371 + 2279 2372 let variant_ident = syn::Ident::new(&variant_name, proc_macro2::Span::call_site()); 2280 2373 2281 2374 // Get the Rust type for this ref 2282 - let rust_type = self.ref_to_rust_type(ref_str.as_ref())?; 2375 + let rust_type = self.ref_to_rust_type(info.ref_str)?; 2283 2376 2284 2377 // Add serde rename for the full NSID 2285 - let ref_str_literal = ref_str.as_ref(); 2378 + let ref_str_literal = info.ref_str; 2286 2379 variants.push(quote! { 2287 2380 #[serde(rename = #ref_str_literal)] 2288 2381 #variant_ident(Box<#rust_type>) ··· 2481 2574 } 2482 2575 } 2483 2576 } 2577 + 2578 + /// Get namespace dependencies collected during code generation 2579 + pub fn get_namespace_dependencies( 2580 + &self, 2581 + ) -> std::collections::HashMap<String, std::collections::HashSet<String>> { 2582 + self.namespace_deps.borrow().clone() 2583 + } 2584 + 2585 + /// Generate Cargo.toml features section from namespace dependencies 2586 + pub fn generate_cargo_features(&self, lib_rs_path: Option<&std::path::Path>) -> String { 2587 + use std::fmt::Write; 2588 + 2589 + let deps = self.namespace_deps.borrow(); 2590 + let mut all_namespaces: std::collections::HashSet<String> = 2591 + std::collections::HashSet::new(); 2592 + 2593 + // Collect all namespaces from the corpus (first two segments of each NSID) 2594 + for (nsid, _doc) in self.corpus.iter() { 2595 + let parts: Vec<_> = nsid.as_str().splitn(3, '.').collect(); 2596 + let namespace = if parts.len() >= 2 { 2597 + format!("{}.{}", parts[0], parts[1]) 2598 + } else { 2599 + nsid.to_string() 2600 + }; 2601 + all_namespaces.insert(namespace); 2602 + } 2603 + 2604 + // Also collect existing feature names from lib.rs 2605 + let mut existing_features = std::collections::HashSet::new(); 2606 + if let Some(lib_rs) = lib_rs_path { 2607 + if let Ok(content) = std::fs::read_to_string(lib_rs) { 2608 + for line in content.lines() { 2609 + if let Some(feature) = line.trim() 2610 + .strip_prefix("#[cfg(feature = \"") 2611 + .and_then(|s| s.strip_suffix("\")]")) 2612 + { 2613 + existing_features.insert(feature.to_string()); 2614 + } 2615 + } 2616 + } 2617 + } 2618 + 2619 + let mut output = String::new(); 2620 + writeln!(&mut output, "# Generated namespace features").unwrap(); 2621 + writeln!(&mut output, "# Each namespace feature automatically enables its dependencies").unwrap(); 2622 + 2623 + // Convert namespace to feature name (matching module path sanitization) 2624 + let to_feature_name = |ns: &str| { 2625 + ns.split('.') 2626 + .map(|segment| { 2627 + // Apply same sanitization as module names 2628 + let mut result = segment.replace('-', "_"); 2629 + // Prefix with underscore if starts with digit 2630 + if result.chars().next().map_or(false, |c| c.is_ascii_digit()) { 2631 + result.insert(0, '_'); 2632 + } 2633 + result 2634 + }) 2635 + .collect::<Vec<_>>() 2636 + .join("_") 2637 + }; 2638 + 2639 + // Collect all feature names (from corpus + existing lib.rs) 2640 + let mut all_feature_names = std::collections::HashSet::new(); 2641 + for ns in &all_namespaces { 2642 + all_feature_names.insert(to_feature_name(ns)); 2643 + } 2644 + all_feature_names.extend(existing_features); 2645 + 2646 + // Sort for consistent output 2647 + let mut feature_names: Vec<_> = all_feature_names.iter().collect(); 2648 + feature_names.sort(); 2649 + 2650 + // Map namespace to feature name for dependency lookup 2651 + let mut ns_to_feature: std::collections::HashMap<&str, String> = std::collections::HashMap::new(); 2652 + for ns in &all_namespaces { 2653 + ns_to_feature.insert(ns.as_str(), to_feature_name(ns)); 2654 + } 2655 + 2656 + for feature_name in feature_names { 2657 + // Find corresponding namespace for this feature (if any) to look up deps 2658 + let feature_deps: Vec<String> = all_namespaces 2659 + .iter() 2660 + .find(|ns| to_feature_name(ns) == *feature_name) 2661 + .and_then(|ns| deps.get(ns.as_str())) 2662 + .map(|ns_deps| { 2663 + let mut dep_features: Vec<_> = ns_deps 2664 + .iter() 2665 + .map(|d| format!("\"{}\"", to_feature_name(d))) 2666 + .collect(); 2667 + dep_features.sort(); 2668 + dep_features 2669 + }) 2670 + .unwrap_or_default(); 2671 + 2672 + if !feature_deps.is_empty() { 2673 + writeln!( 2674 + &mut output, 2675 + "{} = [{}]", 2676 + feature_name, 2677 + feature_deps.join(", ") 2678 + ) 2679 + .unwrap(); 2680 + } else { 2681 + writeln!(&mut output, "{} = []", feature_name).unwrap(); 2682 + } 2683 + } 2684 + 2685 + output 2686 + } 2484 2687 } 2485 2688 2486 2689 /// Enum variant kind for IntoStatic generation ··· 2534 2737 ]; 2535 2738 2536 2739 let tokens = codegen 2537 - .generate_union("RecordEmbed", &refs, Some("Post embed union"), None) 2740 + .generate_union( 2741 + "app.bsky.feed.post", 2742 + "RecordEmbed", 2743 + &refs, 2744 + Some("Post embed union"), 2745 + None, 2746 + ) 2538 2747 .expect("generate union"); 2539 2748 2540 2749 let file: syn::File = syn::parse2(tokens).expect("parse tokens");
+11
crates/jacquard-lexicon/src/fetch/config.rs
··· 16 16 pub lexicons_dir: PathBuf, 17 17 pub codegen_dir: PathBuf, 18 18 pub root_module: Option<String>, 19 + pub cargo_toml_path: Option<PathBuf>, 19 20 } 20 21 21 22 impl Config { ··· 58 59 let mut lexicons_dir: Option<PathBuf> = None; 59 60 let mut codegen_dir: Option<PathBuf> = None; 60 61 let mut root_module: Option<String> = None; 62 + let mut cargo_toml_path: Option<PathBuf> = None; 61 63 62 64 for child in children.nodes() { 63 65 match child.name().value() { ··· 85 87 .ok_or_else(|| miette!("root-module expects a string value"))?; 86 88 root_module = Some(val.to_string()); 87 89 } 90 + "cargo-toml" => { 91 + let val = child 92 + .entries() 93 + .get(0) 94 + .and_then(|e| e.value().as_string()) 95 + .ok_or_else(|| miette!("cargo-toml expects a string value"))?; 96 + cargo_toml_path = Some(PathBuf::from(val)); 97 + } 88 98 other => { 89 99 return Err(miette!("Unknown output field: {}", other)); 90 100 } ··· 95 105 lexicons_dir: lexicons_dir.ok_or_else(|| miette!("Missing lexicons directory"))?, 96 106 codegen_dir: codegen_dir.ok_or_else(|| miette!("Missing codegen directory"))?, 97 107 root_module, 108 + cargo_toml_path, 98 109 }) 99 110 } 100 111
+4 -4
crates/jacquard-oauth/Cargo.toml
··· 1 1 [package] 2 2 name = "jacquard-oauth" 3 - version = "0.3.0" 4 - edition = "2024" 3 + version = "0.3.1" 4 + edition.workspace = true 5 5 description = "AT Protocol OAuth 2.1 core types and helpers for Jacquard" 6 6 authors.workspace = true 7 7 repository.workspace = true ··· 12 12 license.workspace = true 13 13 14 14 [dependencies] 15 - jacquard-common = { version = "0.3.0", path = "../jacquard-common", features = ["reqwest-client"] } 16 - jacquard-identity = { version = "0.3.0", path = "../jacquard-identity" } 15 + jacquard-common = { version = "*", path = "../jacquard-common", features = ["reqwest-client"] } 16 + jacquard-identity = { version = "*", path = "../jacquard-identity" } 17 17 serde = { workspace = true, features = ["derive"] } 18 18 serde_json = { workspace = true } 19 19 url = { workspace = true }
+14 -9
crates/jacquard/Cargo.toml
··· 2 2 name = "jacquard" 3 3 description.workspace = true 4 4 edition.workspace = true 5 - version = "0.3.0" 5 + version.workspace = true 6 6 authors.workspace = true 7 7 repository.workspace = true 8 8 keywords.workspace = true ··· 12 12 license.workspace = true 13 13 14 14 [features] 15 - default = ["api_all", "dns", "fancy", "loopback"] 15 + default = ["api_full", "dns", "fancy", "loopback"] 16 16 derive = ["dep:jacquard-derive"] 17 - api = ["jacquard-api/com_atproto"] 18 - api_all = ["api", "jacquard-api/app_bsky", "jacquard-api/chat_bsky", "jacquard-api/tools_ozone"] 17 + api = ["jacquard-api/com_atproto", "jacquard-api/com_bad_example" ] 18 + api_bluesky = ["api", "jacquard-api/bluesky" ] 19 + api_full = ["api", "jacquard-api/bluesky", "jacquard-api/other", "jacquard-api/lexicon_community"] 20 + api_all = ["api_full", "jacquard-api/ufos"] 19 21 dns = ["jacquard-identity/dns"] 20 22 fancy = ["miette/fancy"] 21 23 # Propagate loopback to oauth (server + browser helper) ··· 31 33 32 34 33 35 [dependencies] 34 - jacquard-api = { version = "0.3.0", path = "../jacquard-api" } 35 - jacquard-common = { version = "0.3.0", path = "../jacquard-common", features = ["reqwest-client"] } 36 - jacquard-oauth = { version = "0.3.0", path = "../jacquard-oauth" } 37 - jacquard-derive = { version = "0.3.0", path = "../jacquard-derive", optional = true } 38 - jacquard-identity = { version = "0.3.0", path = "../jacquard-identity" } 36 + jacquard-api = { version = "*", path = "../jacquard-api" } 37 + jacquard-common = { version = "*", path = "../jacquard-common", features = ["reqwest-client"] } 38 + jacquard-oauth = { version = "*", path = "../jacquard-oauth" } 39 + jacquard-derive = { version = "*", path = "../jacquard-derive", optional = true } 40 + jacquard-identity = { version = "*", path = "../jacquard-identity" } 39 41 40 42 bon.workspace = true 41 43 async-trait.workspace = true ··· 57 59 jose-jwk = { workspace = true, features = ["p256"] } 58 60 p256 = { workspace = true, features = ["ecdsa"] } 59 61 rand_core.workspace = true 62 + 63 + [package.metadata.docs.rs] 64 + features = [ "api_all", "derive", "dns", "fancy", "loopback" ]
+2 -1
lexicons.kdl
··· 1 1 output { 2 2 lexicons "crates/jacquard-api/lexicons" 3 3 codegen "crates/jacquard-api/src" 4 + cargo-toml "crates/jacquard-api/Cargo.toml" 4 5 } 5 6 6 7 source "leaflet" type="git" priority=100 { ··· 59 60 pattern "**/*.json" 60 61 } 61 62 62 - source "lexicon-community" type="git" priority=50 { 63 + source "lexicon-community" type="git" priority=60 { 63 64 repo "https://github.com/lexicon-community/lexicon" 64 65 pattern "**/*.json" 65 66 }
+1
nix/modules/devshell.nix
··· 18 18 bacon 19 19 rust-analyzer 20 20 cargo-release 21 + cargo-semver-checks 21 22 ]; 22 23 }; 23 24 };