A better Rust ATProto crate

fixed codegen bug for events.smokesignal

Orual 445fb429 a1b67c7e

Changed files
+18 -7
crates
jacquard-api
src
events_smokesignal
automation
jacquard-lexicon
src
codegen
+7
CHANGELOG.md
··· 1 1 # Changelog 2 2 3 3 4 + ## `jacquard-api` [0.5.5], `jacquard-lexicon` [0.5.4] - 2025-10-16 5 + 6 + ### Fixed 7 + 8 + - events.smokesignal.invokeWebhook lexicon now generates valid code 9 + - lexicon code generation now uses `Data` for blank objects, rather than naming and then failing to generate a struct 10 + 4 11 ## [0.5.4] - 2025-10-16 5 12 6 13 ### Added
+3 -3
Cargo.lock
··· 1857 1857 "clap", 1858 1858 "getrandom 0.2.16", 1859 1859 "http", 1860 - "jacquard-api 0.5.4", 1860 + "jacquard-api 0.5.5", 1861 1861 "jacquard-common 0.5.4", 1862 1862 "jacquard-derive 0.5.4", 1863 1863 "jacquard-identity 0.5.3", ··· 1896 1896 1897 1897 [[package]] 1898 1898 name = "jacquard-api" 1899 - version = "0.5.4" 1899 + version = "0.5.5" 1900 1900 dependencies = [ 1901 1901 "bon", 1902 1902 "bytes", ··· 2070 2070 "bytes", 2071 2071 "hickory-resolver", 2072 2072 "http", 2073 - "jacquard-api 0.5.4", 2073 + "jacquard-api 0.5.5", 2074 2074 "jacquard-common 0.5.4", 2075 2075 "miette", 2076 2076 "percent-encoding",
+1 -1
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 = "0.5.4" 5 + version = "0.5.5" 6 6 authors.workspace = true 7 7 repository.workspace = true 8 8 keywords.workspace = true
+2 -2
crates/jacquard-api/src/events_smokesignal/automation/invoke_webhook.rs
··· 20 20 #[builder(start_fn = new)] 21 21 pub struct InvokeWebhook<'a> { 22 22 #[serde(borrow)] 23 - pub context: InvokeWebhookContext<'a>, 23 + pub context: jacquard_common::types::value::Data<'a>, 24 24 #[serde(borrow)] 25 25 #[builder(into)] 26 26 pub event: jacquard_common::CowStr<'a>, 27 27 #[serde(borrow)] 28 - pub record: InvokeWebhookRecord<'a>, 28 + pub record: jacquard_common::types::value::Data<'a>, 29 29 #[serde(flatten)] 30 30 #[serde(borrow)] 31 31 #[builder(default)]
+5 -1
crates/jacquard-lexicon/src/codegen/types.rs
··· 51 51 Ok(quote! { Vec<#item_type> }) 52 52 } 53 53 } 54 - LexObjectProperty::Object(_object) => { 54 + LexObjectProperty::Object(object) => { 55 + // Empty objects (no properties) are untyped data bags 56 + if object.properties.is_empty() { 57 + return Ok(quote! { jacquard_common::types::value::Data<'a> }); 58 + } 55 59 // Generate unique nested object type name with collision detection 56 60 let object_name = self.generate_field_type_name(nsid, parent_type_name, field_name, ""); 57 61 let object_ident = syn::Ident::new(&object_name, proc_macro2::Span::call_site());