A better Rust ATProto crate

version bump, lexicon updates

+270 -19
+15 -15
Cargo.lock
··· 1739 1739 "clap", 1740 1740 "getrandom 0.2.16", 1741 1741 "http", 1742 - "jacquard-api 0.5.2", 1743 - "jacquard-common 0.5.2", 1742 + "jacquard-api 0.5.3", 1743 + "jacquard-common 0.5.3", 1744 1744 "jacquard-derive 0.5.3", 1745 - "jacquard-identity 0.5.2", 1745 + "jacquard-identity 0.5.3", 1746 1746 "jacquard-oauth", 1747 1747 "jose-jwk", 1748 1748 "miette", ··· 1778 1778 1779 1779 [[package]] 1780 1780 name = "jacquard-api" 1781 - version = "0.5.2" 1781 + version = "0.5.3" 1782 1782 dependencies = [ 1783 1783 "bon", 1784 1784 "bytes", 1785 - "jacquard-common 0.5.2", 1785 + "jacquard-common 0.5.3", 1786 1786 "jacquard-derive 0.5.3", 1787 1787 "miette", 1788 1788 "serde", ··· 1800 1800 "bytes", 1801 1801 "chrono", 1802 1802 "jacquard", 1803 - "jacquard-common 0.5.2", 1803 + "jacquard-common 0.5.3", 1804 1804 "jacquard-derive 0.5.3", 1805 - "jacquard-identity 0.5.2", 1805 + "jacquard-identity 0.5.3", 1806 1806 "k256", 1807 1807 "miette", 1808 1808 "multibase", ··· 1855 1855 1856 1856 [[package]] 1857 1857 name = "jacquard-common" 1858 - version = "0.5.2" 1858 + version = "0.5.3" 1859 1859 dependencies = [ 1860 1860 "base64 0.22.1", 1861 1861 "bon", ··· 1910 1910 name = "jacquard-derive" 1911 1911 version = "0.5.3" 1912 1912 dependencies = [ 1913 - "jacquard-common 0.5.2", 1913 + "jacquard-common 0.5.3", 1914 1914 "proc-macro2", 1915 1915 "quote", 1916 1916 "serde", ··· 1943 1943 1944 1944 [[package]] 1945 1945 name = "jacquard-identity" 1946 - version = "0.5.2" 1946 + version = "0.5.3" 1947 1947 dependencies = [ 1948 1948 "bon", 1949 1949 "bytes", 1950 1950 "hickory-resolver", 1951 1951 "http", 1952 - "jacquard-api 0.5.2", 1953 - "jacquard-common 0.5.2", 1952 + "jacquard-api 0.5.3", 1953 + "jacquard-common 0.5.3", 1954 1954 "miette", 1955 1955 "percent-encoding", 1956 1956 "reqwest", ··· 1995 1995 1996 1996 [[package]] 1997 1997 name = "jacquard-oauth" 1998 - version = "0.5.2" 1998 + version = "0.5.3" 1999 1999 dependencies = [ 2000 2000 "base64 0.22.1", 2001 2001 "bytes", ··· 2003 2003 "dashmap", 2004 2004 "elliptic-curve", 2005 2005 "http", 2006 - "jacquard-common 0.5.2", 2007 - "jacquard-identity 0.5.2", 2006 + "jacquard-common 0.5.3", 2007 + "jacquard-identity 0.5.3", 2008 2008 "jose-jwa", 2009 2009 "jose-jwk", 2010 2010 "miette",
+2 -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.2" 5 + version = "0.5.3" 6 6 authors.workspace = true 7 7 repository.workspace = true 8 8 keywords.workspace = true ··· 62 62 moe_karashiiro = [] 63 63 my_skylights = [] 64 64 net_aftertheinter = [] 65 + net_altq = [] 65 66 net_anisota = ["app_bsky"] 66 67 net_bnewbold = [] 67 68 net_mmatt = []
+106
crates/jacquard-api/lexicons/net_altq_aqfile.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "net.altq.aqfile", 4 + "description": "A record for uploading and tracking binary blob files with metadata.", 5 + "defs": { 6 + "checksum": { 7 + "type": "object", 8 + "description": "Cryptographic checksum for integrity verification.", 9 + "required": [ 10 + "algo", 11 + "hash" 12 + ], 13 + "properties": { 14 + "algo": { 15 + "type": "string", 16 + "description": "Hash algorithm name.", 17 + "maxLength": 32, 18 + "knownValues": [ 19 + "sha256", 20 + "sha512", 21 + "blake3" 22 + ] 23 + }, 24 + "hash": { 25 + "type": "string", 26 + "description": "Hex or base64 encoded digest produced by the algorithm.", 27 + "maxLength": 128 28 + } 29 + } 30 + }, 31 + "file": { 32 + "type": "object", 33 + "description": "File metadata describing the uploaded blob.", 34 + "required": [ 35 + "name", 36 + "size" 37 + ], 38 + "properties": { 39 + "mimeType": { 40 + "type": "string", 41 + "description": "MIME type, e.g. 'video/mp4'.", 42 + "maxLength": 255 43 + }, 44 + "modifiedAt": { 45 + "type": "string", 46 + "description": "Client-side last-modified timestamp.", 47 + "format": "datetime" 48 + }, 49 + "name": { 50 + "type": "string", 51 + "description": "User-visible filename.", 52 + "maxLength": 512 53 + }, 54 + "size": { 55 + "type": "integer", 56 + "description": "File size in bytes.", 57 + "minimum": 0, 58 + "maximum": 1000000000 59 + } 60 + } 61 + }, 62 + "main": { 63 + "type": "record", 64 + "description": "A record representing an uploaded file blob with metadata.", 65 + "key": "any", 66 + "record": { 67 + "type": "object", 68 + "required": [ 69 + "blob", 70 + "createdAt", 71 + "file" 72 + ], 73 + "properties": { 74 + "attribution": { 75 + "type": "string", 76 + "description": "Handle or DID of the account to attribute this upload to.", 77 + "format": "at-identifier" 78 + }, 79 + "blob": { 80 + "type": "blob", 81 + "description": "The uploaded blob reference. Note: Individual PDS instances may enforce lower size limits.", 82 + "accept": [ 83 + "*/*" 84 + ], 85 + "maxSize": 1000000000 86 + }, 87 + "checksum": { 88 + "type": "ref", 89 + "description": "Optional cryptographic checksum for integrity verification.", 90 + "ref": "#checksum" 91 + }, 92 + "createdAt": { 93 + "type": "string", 94 + "description": "Timestamp when this record was created.", 95 + "format": "datetime" 96 + }, 97 + "file": { 98 + "type": "ref", 99 + "description": "Metadata about the file.", 100 + "ref": "#file" 101 + } 102 + } 103 + } 104 + } 105 + } 106 + }
+3
crates/jacquard-api/src/lib.rs
··· 87 87 #[cfg(feature = "net_aftertheinter")] 88 88 pub mod net_aftertheinter; 89 89 90 + #[cfg(feature = "net_altq")] 91 + pub mod net_altq; 92 + 90 93 #[cfg(feature = "net_anisota")] 91 94 pub mod net_anisota; 92 95
+6
crates/jacquard-api/src/net_altq.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 aqfile;
+135
crates/jacquard-api/src/net_altq/aqfile.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: net.altq.aqfile 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + /// Cryptographic checksum for integrity verification. 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 + Default 19 + )] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct Checksum<'a> { 22 + /// Hash algorithm name. 23 + #[serde(borrow)] 24 + pub algo: jacquard_common::CowStr<'a>, 25 + /// Hex or base64 encoded digest produced by the algorithm. 26 + #[serde(borrow)] 27 + pub hash: jacquard_common::CowStr<'a>, 28 + } 29 + 30 + /// File metadata describing the uploaded blob. 31 + #[jacquard_derive::lexicon] 32 + #[derive( 33 + serde::Serialize, 34 + serde::Deserialize, 35 + Debug, 36 + Clone, 37 + PartialEq, 38 + Eq, 39 + jacquard_derive::IntoStatic, 40 + bon::Builder 41 + )] 42 + #[serde(rename_all = "camelCase")] 43 + pub struct File<'a> { 44 + /// MIME type, e.g. 'video/mp4'. 45 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 46 + #[builder(into)] 47 + #[serde(borrow)] 48 + pub mime_type: Option<jacquard_common::CowStr<'a>>, 49 + /// Client-side last-modified timestamp. 50 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 51 + #[builder(into)] 52 + pub modified_at: Option<jacquard_common::types::string::Datetime>, 53 + /// User-visible filename. 54 + #[serde(borrow)] 55 + #[builder(into)] 56 + pub name: jacquard_common::CowStr<'a>, 57 + /// File size in bytes. 58 + pub size: i64, 59 + } 60 + 61 + /// A record representing an uploaded file blob with metadata. 62 + #[jacquard_derive::lexicon] 63 + #[derive( 64 + serde::Serialize, 65 + serde::Deserialize, 66 + Debug, 67 + Clone, 68 + PartialEq, 69 + Eq, 70 + jacquard_derive::IntoStatic, 71 + bon::Builder 72 + )] 73 + #[serde(rename_all = "camelCase")] 74 + pub struct Aqfile<'a> { 75 + /// Handle or DID of the account to attribute this upload to. 76 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 77 + #[builder(into)] 78 + #[serde(borrow)] 79 + pub attribution: Option<jacquard_common::types::ident::AtIdentifier<'a>>, 80 + /// The uploaded blob reference. Note: Individual PDS instances may enforce lower size limits. 81 + #[serde(borrow)] 82 + pub blob: jacquard_common::types::blob::Blob<'a>, 83 + /// Optional cryptographic checksum for integrity verification. 84 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 85 + #[builder(into)] 86 + #[serde(borrow)] 87 + pub checksum: Option<crate::net_altq::aqfile::Checksum<'a>>, 88 + /// Timestamp when this record was created. 89 + pub created_at: jacquard_common::types::string::Datetime, 90 + /// Metadata about the file. 91 + #[serde(borrow)] 92 + pub file: crate::net_altq::aqfile::File<'a>, 93 + } 94 + 95 + /// Typed wrapper for GetRecord response with this collection's record type. 96 + #[derive( 97 + serde::Serialize, 98 + serde::Deserialize, 99 + Debug, 100 + Clone, 101 + PartialEq, 102 + Eq, 103 + jacquard_derive::IntoStatic 104 + )] 105 + #[serde(rename_all = "camelCase")] 106 + pub struct AqfileGetRecordOutput<'a> { 107 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 108 + #[serde(borrow)] 109 + pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 110 + #[serde(borrow)] 111 + pub uri: jacquard_common::types::string::AtUri<'a>, 112 + #[serde(borrow)] 113 + pub value: Aqfile<'a>, 114 + } 115 + 116 + /// Marker type for deserializing records from this collection. 117 + pub struct AqfileRecord; 118 + impl jacquard_common::xrpc::XrpcResp for AqfileRecord { 119 + const NSID: &'static str = "net.altq.aqfile"; 120 + const ENCODING: &'static str = "application/json"; 121 + type Output<'de> = AqfileGetRecordOutput<'de>; 122 + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 123 + } 124 + 125 + impl jacquard_common::types::collection::Collection for Aqfile<'_> { 126 + const NSID: &'static str = "net.altq.aqfile"; 127 + type Record = AqfileRecord; 128 + } 129 + 130 + impl From<AqfileGetRecordOutput<'_>> for Aqfile<'_> { 131 + fn from(output: AqfileGetRecordOutput<'_>) -> Self { 132 + use jacquard_common::IntoStatic; 133 + output.value.into_static() 134 + } 135 + }
+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 = "0.5.2" 5 + version = "0.5.3" 6 6 authors.workspace = true 7 7 repository.workspace = true 8 8 keywords.workspace = true
+1 -1
crates/jacquard-identity/Cargo.toml
··· 1 1 [package] 2 2 name = "jacquard-identity" 3 3 edition.workspace = true 4 - version = "0.5.2" 4 + version = "0.5.3" 5 5 authors.workspace = true 6 6 repository.workspace = true 7 7 keywords.workspace = true
+1 -1
crates/jacquard-oauth/Cargo.toml
··· 1 1 [package] 2 2 name = "jacquard-oauth" 3 - version = "0.5.2" 3 + version = "0.5.3" 4 4 edition.workspace = true 5 5 description = "AT Protocol OAuth 2.1 core types and helpers for Jacquard" 6 6 authors.workspace = true