diff --git a/Cargo.lock b/Cargo.lock index 71f39a3..94c5731 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -820,6 +820,7 @@ dependencies = [ name = "jacquard-lexicon" version = "0.1.0" dependencies = [ + "clap", "heck 0.5.0", "itertools", "jacquard-common", diff --git a/crates/jacquard-api/src/app_bsky.rs b/crates/jacquard-api/src/app_bsky.rs index 22a9dd1..6cdcc8f 100644 --- a/crates/jacquard-api/src/app_bsky.rs +++ b/crates/jacquard-api/src/app_bsky.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + pub mod actor; pub mod bookmark; pub mod embed; @@ -7,4 +12,4 @@ pub mod labeler; pub mod notification; pub mod richtext; pub mod unspecced; -pub mod video; +pub mod video; \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor.rs b/crates/jacquard-api/src/app_bsky/actor.rs index c4aed3b..1460866 100644 --- a/crates/jacquard-api/src/app_bsky/actor.rs +++ b/crates/jacquard-api/src/app_bsky/actor.rs @@ -1,9 +1,25 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_preferences; +pub mod get_profile; +pub mod get_profiles; +pub mod get_suggestions; +pub mod profile; +pub mod put_preferences; +pub mod search_actors; +pub mod search_actors_typeahead; +pub mod status; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AdultContentPref<'a> { pub enabled: bool, } + ///If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -12,6 +28,7 @@ pub struct BskyAppProgressGuide<'a> { #[serde(borrow)] pub guide: jacquard_common::CowStr<'a>, } + ///A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -20,58 +37,74 @@ pub struct BskyAppStatePref<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub active_progress_guide: std::option::Option< - jacquard_common::types::value::Data<'a>, + crate::app_bsky::actor::BskyAppProgressGuide<'a>, >, + ///Storage for NUXs the user has encountered. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub nuxs: std::option::Option>>, + ///An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub queued_nudges: std::option::Option>>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ContentLabelPref<'a> { #[serde(borrow)] pub label: jacquard_common::CowStr<'a>, + ///Which labeler does this preference apply to? If undefined, applies globally. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labeler_did: std::option::Option>, #[serde(borrow)] pub visibility: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct FeedViewPref<'a> { + ///The URI of the feed, or an identifier which describes the feed. #[serde(borrow)] pub feed: jacquard_common::CowStr<'a>, + ///Hide quote posts in the feed. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_quote_posts: std::option::Option, + ///Hide replies in the feed. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_replies: std::option::Option, + ///Hide replies in the feed if they do not have this number of likes. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_replies_by_like_count: std::option::Option, + ///Hide replies in the feed if they are not by followed users. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_replies_by_unfollowed: std::option::Option, + ///Hide reposts in the feed. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_reposts: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct HiddenPostsPref<'a> { + ///A list of URIs of posts the account owner has hidden. #[serde(borrow)] pub items: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct InterestsPref<'a> { + ///A list of tags which describe the account owner's interests gathered during onboarding. #[serde(borrow)] pub tags: Vec>, } + ///The subject's followers whom you also follow #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -79,8 +112,9 @@ pub struct InterestsPref<'a> { pub struct KnownFollowers<'a> { pub count: i64, #[serde(borrow)] - pub followers: Vec>, + pub followers: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -88,37 +122,45 @@ pub struct LabelerPrefItem<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct LabelersPref<'a> { #[serde(borrow)] - pub labelers: Vec>, + pub labelers: Vec>, } + ///A word that the account owner has muted. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MutedWord<'a> { + ///Groups of users to apply the muted word to. If undefined, applies to all users. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub actor_target: std::option::Option>, + ///The date and time at which the muted word will expire and no longer be applied. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub expires_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub id: std::option::Option>, + ///The intended targets of the muted word. #[serde(borrow)] pub targets: Vec>, + ///The muted word itself. #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum MutedWordTarget<'a> { Content, Tag, Other(jacquard_common::CowStr<'a>), } + impl<'a> MutedWordTarget<'a> { pub fn as_str(&self) -> &str { match self { @@ -128,6 +170,7 @@ impl<'a> MutedWordTarget<'a> { } } } + impl<'a> From<&'a str> for MutedWordTarget<'a> { fn from(s: &'a str) -> Self { match s { @@ -137,6 +180,7 @@ impl<'a> From<&'a str> for MutedWordTarget<'a> { } } } + impl<'a> From for MutedWordTarget<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -146,11 +190,13 @@ impl<'a> From for MutedWordTarget<'a> { } } } + impl<'a> AsRef for MutedWordTarget<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for MutedWordTarget<'a> { fn serialize(&self, serializer: S) -> Result where @@ -159,6 +205,7 @@ impl<'a> serde::Serialize for MutedWordTarget<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for MutedWordTarget<'a> where 'de: 'a, @@ -171,50 +218,61 @@ where Ok(Self::from(s)) } } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MutedWordsPref<'a> { + ///A list of words the account owner has muted. #[serde(borrow)] pub items: Vec>, } + ///A new user experiences (NUX) storage object #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Nux<'a> { pub completed: bool, + ///Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub data: std::option::Option>, + ///The date and time at which the NUX will expire and should be considered completed. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub expires_at: std::option::Option, #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct PersonalDetailsPref<'a> { + ///The birth date of account owner. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub birth_date: std::option::Option, } + ///Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct PostInteractionSettingsPref<'a> { + ///Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub postgate_embedding_rules: std::option::Option< Vec>, >, + ///Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub threadgate_allow_rules: std::option::Option< Vec>, >, } + pub type Preferences<'a> = Vec>; #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -223,11 +281,11 @@ pub struct ProfileAssociated<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub activity_subscription: std::option::Option< - jacquard_common::types::value::Data<'a>, + crate::app_bsky::actor::ProfileAssociatedActivitySubscription<'a>, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub chat: std::option::Option>, + pub chat: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub feedgens: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -237,6 +295,7 @@ pub struct ProfileAssociated<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub starter_packs: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -244,6 +303,7 @@ pub struct ProfileAssociatedActivitySubscription<'a> { #[serde(borrow)] pub allow_subscriptions: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -251,13 +311,14 @@ pub struct ProfileAssociatedChat<'a> { #[serde(borrow)] pub allow_incoming: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ProfileView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub associated: std::option::Option>, + pub associated: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, @@ -283,21 +344,22 @@ pub struct ProfileView<'a> { pub pronouns: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub status: std::option::Option>, + pub status: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub verification: std::option::Option>, + pub verification: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub viewer: std::option::Option>, + pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ProfileViewBasic<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub associated: std::option::Option>, + pub associated: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, @@ -318,21 +380,22 @@ pub struct ProfileViewBasic<'a> { pub pronouns: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub status: std::option::Option>, + pub status: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub verification: std::option::Option>, + pub verification: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub viewer: std::option::Option>, + pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ProfileViewDetailed<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub associated: std::option::Option>, + pub associated: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, @@ -377,17 +440,18 @@ pub struct ProfileViewDetailed<'a> { pub pronouns: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub status: std::option::Option>, + pub status: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub verification: std::option::Option>, + pub verification: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub viewer: std::option::Option>, + pub viewer: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub website: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -400,6 +464,7 @@ pub struct SavedFeed<'a> { #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -411,6 +476,7 @@ pub struct SavedFeedsPref<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub timeline_index: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -418,22 +484,28 @@ pub struct SavedFeedsPrefV2<'a> { #[serde(borrow)] pub items: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct StatusView<'a> { + ///An optional embed associated with the status. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embed: std::option::Option>, + ///The date when this status will expire. The application might choose to no longer return the status after expiration. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub expires_at: std::option::Option, + ///True if the status is not expired, false if it is expired. Only present if expiration was set. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub is_active: std::option::Option, #[serde(borrow)] pub record: jacquard_common::types::value::Data<'a>, + ///The status for the account. #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -442,53 +514,69 @@ pub enum StatusViewRecordEmbed<'a> { #[serde(rename = "app.bsky.embed.external#view")] ExternalView(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ThreadViewPref<'a> { + ///Show followed users at the top of all replies. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub prioritize_followed_users: std::option::Option, + ///Sorting mode for threads. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub sort: std::option::Option>, } + ///Preferences for how verified accounts appear in the app. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct VerificationPrefs<'a> { + ///Hide the blue check badges for verified accounts and trusted verifiers. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_badges: std::option::Option, } + ///Represents the verification information about the user this object is attached to. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct VerificationState<'a> { + ///The user's status as a trusted verifier. #[serde(borrow)] pub trusted_verifier_status: jacquard_common::CowStr<'a>, + ///All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. #[serde(borrow)] - pub verifications: Vec>, + pub verifications: Vec>, + ///The user's status as a verified account. #[serde(borrow)] pub verified_status: jacquard_common::CowStr<'a>, } + ///An individual verification for an associated subject. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct VerificationView<'a> { + ///Timestamp when the verification was created. pub created_at: jacquard_common::types::string::Datetime, + ///True if the verification passes validation, otherwise false. pub is_valid: bool, + ///The user who issued this verification. #[serde(borrow)] pub issuer: jacquard_common::types::string::Did<'a>, + ///The AT-URI of the verification record. #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + ///Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ViewerState<'a> { + ///This property is present only in selected cases, as an optimization. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub activity_subscription: std::option::Option< @@ -508,21 +596,13 @@ pub struct ViewerState<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub following: std::option::Option>, + ///This property is present only in selected cases, as an optimization. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub known_followers: std::option::Option>, + pub known_followers: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub muted: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub muted_by_list: std::option::Option>, -} -pub mod get_preferences; -pub mod get_profile; -pub mod get_profiles; -pub mod get_suggestions; -pub mod profile; -pub mod put_preferences; -pub mod search_actors; -pub mod search_actors_typeahead; -pub mod status; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/get_preferences.rs b/crates/jacquard-api/src/app_bsky/actor/get_preferences.rs index 960122d..7e9cfb4 100644 --- a/crates/jacquard-api/src/app_bsky/actor/get_preferences.rs +++ b/crates/jacquard-api/src/app_bsky/actor/get_preferences.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPreferencesParams {} @@ -7,4 +12,4 @@ pub struct GetPreferencesParams {} pub struct GetPreferencesOutput<'a> { #[serde(borrow)] pub preferences: crate::app_bsky::actor::Preferences<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/get_profile.rs b/crates/jacquard-api/src/app_bsky/actor/get_profile.rs index fe09cb7..e1702ec 100644 --- a/crates/jacquard-api/src/app_bsky/actor/get_profile.rs +++ b/crates/jacquard-api/src/app_bsky/actor/get_profile.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetProfileParams<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -11,4 +17,4 @@ pub struct GetProfileOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::app_bsky::actor::ProfileViewDetailed<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/get_profiles.rs b/crates/jacquard-api/src/app_bsky/actor/get_profiles.rs index 652630f..c9a84a4 100644 --- a/crates/jacquard-api/src/app_bsky/actor/get_profiles.rs +++ b/crates/jacquard-api/src/app_bsky/actor/get_profiles.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetProfilesParams<'a> { #[serde(borrow)] pub actors: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetProfilesOutput<'a> { #[serde(borrow)] pub profiles: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/get_suggestions.rs b/crates/jacquard-api/src/app_bsky/actor/get_suggestions.rs index c77a17c..e7832a5 100644 --- a/crates/jacquard-api/src/app_bsky/actor/get_suggestions.rs +++ b/crates/jacquard-api/src/app_bsky/actor/get_suggestions.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestionsParams<'a> { @@ -7,6 +12,7 @@ pub struct GetSuggestionsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,6 +22,7 @@ pub struct GetSuggestionsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, + ///Snowflake for this recommendation, use when submitting recommendation events. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub rec_id: std::option::Option, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/profile.rs b/crates/jacquard-api/src/app_bsky/actor/profile.rs index f6b793d..7b46ae6 100644 --- a/crates/jacquard-api/src/app_bsky/actor/profile.rs +++ b/crates/jacquard-api/src/app_bsky/actor/profile.rs @@ -1,16 +1,24 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///A declaration of a Bluesky account profile. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Profile<'a> { + ///Small image to be displayed next to posts from account. AKA, 'profile picture' #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, + ///Larger horizontal image to display behind profile view. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub banner: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: std::option::Option, + ///Free-form profile description text. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub description: std::option::Option>, @@ -22,6 +30,7 @@ pub struct Profile<'a> { pub joined_via_starter_pack: std::option::Option< crate::com_atproto::repo::strong_ref::StrongRef<'a>, >, + ///Self-label values, specific to the Bluesky application, on the overall account. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>, @@ -30,6 +39,7 @@ pub struct Profile<'a> { pub pinned_post: std::option::Option< crate::com_atproto::repo::strong_ref::StrongRef<'a>, >, + ///Free-form pronouns text. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pronouns: std::option::Option>, @@ -37,6 +47,7 @@ pub struct Profile<'a> { #[serde(borrow)] pub website: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -44,4 +55,4 @@ pub struct Profile<'a> { pub enum ProfileRecordLabels<'a> { #[serde(rename = "com.atproto.label.defs#selfLabels")] DefsSelfLabels(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/put_preferences.rs b/crates/jacquard-api/src/app_bsky/actor/put_preferences.rs index cd8587a..85842ae 100644 --- a/crates/jacquard-api/src/app_bsky/actor/put_preferences.rs +++ b/crates/jacquard-api/src/app_bsky/actor/put_preferences.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct PutPreferencesInput<'a> { #[serde(borrow)] pub preferences: crate::app_bsky::actor::Preferences<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/search_actors.rs b/crates/jacquard-api/src/app_bsky/actor/search_actors.rs index e0ea1fc..9990843 100644 --- a/crates/jacquard-api/src/app_bsky/actor/search_actors.rs +++ b/crates/jacquard-api/src/app_bsky/actor/search_actors.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchActorsParams<'a> { @@ -13,6 +18,7 @@ pub struct SearchActorsParams<'a> { #[serde(borrow)] pub term: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +28,4 @@ pub struct SearchActorsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/search_actors_typeahead.rs b/crates/jacquard-api/src/app_bsky/actor/search_actors_typeahead.rs index 64f9dde..10835ac 100644 --- a/crates/jacquard-api/src/app_bsky/actor/search_actors_typeahead.rs +++ b/crates/jacquard-api/src/app_bsky/actor/search_actors_typeahead.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchActorsTypeaheadParams<'a> { @@ -10,10 +15,11 @@ pub struct SearchActorsTypeaheadParams<'a> { #[serde(borrow)] pub term: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchActorsTypeaheadOutput<'a> { #[serde(borrow)] pub actors: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/actor/status.rs b/crates/jacquard-api/src/app_bsky/actor/status.rs index cb64b90..b51e765 100644 --- a/crates/jacquard-api/src/app_bsky/actor/status.rs +++ b/crates/jacquard-api/src/app_bsky/actor/status.rs @@ -1,17 +1,26 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///A declaration of a Bluesky account status. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Status<'a> { pub created_at: jacquard_common::types::string::Datetime, + ///The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub duration_minutes: std::option::Option, + ///An optional embed associated with the status. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embed: std::option::Option>, + ///The status for the account. #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -19,4 +28,4 @@ pub struct Status<'a> { pub enum StatusRecordEmbed<'a> { #[serde(rename = "app.bsky.embed.external")] External(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/bookmark.rs b/crates/jacquard-api/src/app_bsky/bookmark.rs index 1174f6b..482d546 100644 --- a/crates/jacquard-api/src/app_bsky/bookmark.rs +++ b/crates/jacquard-api/src/app_bsky/bookmark.rs @@ -1,11 +1,22 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod create_bookmark; +pub mod delete_bookmark; +pub mod get_bookmarks; + ///Object used to store bookmark data in stash. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Bookmark<'a> { + ///A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported. #[serde(borrow)] pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -14,9 +25,11 @@ pub struct BookmarkView<'a> { pub created_at: std::option::Option, #[serde(borrow)] pub item: BookmarkViewRecordItem<'a>, + ///A strong ref to the bookmarked record. #[serde(borrow)] pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -28,7 +41,4 @@ pub enum BookmarkViewRecordItem<'a> { DefsNotFoundPost(Box>), #[serde(rename = "app.bsky.feed.defs#postView")] DefsPostView(Box>), -} -pub mod create_bookmark; -pub mod delete_bookmark; -pub mod get_bookmarks; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/bookmark/create_bookmark.rs b/crates/jacquard-api/src/app_bsky/bookmark/create_bookmark.rs index baef8a2..2fddb3e 100644 --- a/crates/jacquard-api/src/app_bsky/bookmark/create_bookmark.rs +++ b/crates/jacquard-api/src/app_bsky/bookmark/create_bookmark.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct CreateBookmarkInput<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -25,6 +31,7 @@ pub enum CreateBookmarkError<'a> { #[serde(rename = "UnsupportedCollection")] UnsupportedCollection(std::option::Option), } + impl std::fmt::Display for CreateBookmarkError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -35,7 +42,7 @@ impl std::fmt::Display for CreateBookmarkError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/bookmark/delete_bookmark.rs b/crates/jacquard-api/src/app_bsky/bookmark/delete_bookmark.rs index 2f74b81..7f16317 100644 --- a/crates/jacquard-api/src/app_bsky/bookmark/delete_bookmark.rs +++ b/crates/jacquard-api/src/app_bsky/bookmark/delete_bookmark.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,6 +10,7 @@ pub struct DeleteBookmarkInput<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -23,6 +29,7 @@ pub enum DeleteBookmarkError<'a> { #[serde(rename = "UnsupportedCollection")] UnsupportedCollection(std::option::Option), } + impl std::fmt::Display for DeleteBookmarkError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -33,7 +40,7 @@ impl std::fmt::Display for DeleteBookmarkError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/bookmark/get_bookmarks.rs b/crates/jacquard-api/src/app_bsky/bookmark/get_bookmarks.rs index 04427a9..46ca2af 100644 --- a/crates/jacquard-api/src/app_bsky/bookmark/get_bookmarks.rs +++ b/crates/jacquard-api/src/app_bsky/bookmark/get_bookmarks.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetBookmarksParams<'a> { @@ -7,6 +12,7 @@ pub struct GetBookmarksParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,4 +22,4 @@ pub struct GetBookmarksOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/embed.rs b/crates/jacquard-api/src/app_bsky/embed.rs index 8d46210..12a3bb3 100644 --- a/crates/jacquard-api/src/app_bsky/embed.rs +++ b/crates/jacquard-api/src/app_bsky/embed.rs @@ -1,3 +1,14 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod external; +pub mod images; +pub mod record; +pub mod record_with_media; +pub mod video; + ///width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -5,9 +16,4 @@ pub struct AspectRatio<'a> { pub height: i64, pub width: i64, -} -pub mod external; -pub mod images; -pub mod record; -pub mod record_with_media; -pub mod video; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/embed/external.rs b/crates/jacquard-api/src/app_bsky/embed/external.rs index b45e46d..b5ce700 100644 --- a/crates/jacquard-api/src/app_bsky/embed/external.rs +++ b/crates/jacquard-api/src/app_bsky/embed/external.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -12,21 +17,24 @@ pub struct External<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::Uri<'a>, } + ///A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ExternalRecord<'a> { #[serde(borrow)] - pub external: jacquard_common::types::value::Data<'a>, + pub external: crate::app_bsky::embed::external::External<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct View<'a> { #[serde(borrow)] - pub external: jacquard_common::types::value::Data<'a>, + pub external: crate::app_bsky::embed::external::ViewExternal<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -40,4 +48,4 @@ pub struct ViewExternal<'a> { pub title: jacquard_common::CowStr<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::Uri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/embed/images.rs b/crates/jacquard-api/src/app_bsky/embed/images.rs index c27948c..c69ad9f 100644 --- a/crates/jacquard-api/src/app_bsky/embed/images.rs +++ b/crates/jacquard-api/src/app_bsky/embed/images.rs @@ -1,7 +1,13 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Image<'a> { + ///Alt text description of the image, for accessibility. #[serde(borrow)] pub alt: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -10,31 +16,37 @@ pub struct Image<'a> { #[serde(borrow)] pub image: jacquard_common::types::blob::Blob<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Images<'a> { #[serde(borrow)] - pub images: Vec>, + pub images: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct View<'a> { #[serde(borrow)] - pub images: Vec>, + pub images: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ViewImage<'a> { + ///Alt text description of the image, for accessibility. #[serde(borrow)] pub alt: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub aspect_ratio: std::option::Option>, + ///Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. #[serde(borrow)] pub fullsize: jacquard_common::types::string::Uri<'a>, + ///Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. #[serde(borrow)] pub thumb: jacquard_common::types::string::Uri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/embed/record.rs b/crates/jacquard-api/src/app_bsky/embed/record.rs index 0a878b3..0098d5f 100644 --- a/crates/jacquard-api/src/app_bsky/embed/record.rs +++ b/crates/jacquard-api/src/app_bsky/embed/record.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,6 +10,7 @@ pub struct Record<'a> { #[serde(borrow)] pub record: crate::com_atproto::repo::strong_ref::StrongRef<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -12,6 +18,7 @@ pub struct View<'a> { #[serde(borrow)] pub record: ViewRecordRecord<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -26,6 +33,7 @@ pub enum ViewRecordRecord<'a> { #[serde(rename = "app.bsky.graph.defs#starterPackViewBasic")] DefsStarterPackViewBasic(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -36,6 +44,7 @@ pub struct ViewBlocked<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -44,6 +53,7 @@ pub struct ViewDetached<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -52,6 +62,7 @@ pub struct ViewNotFound<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -77,6 +88,7 @@ pub struct ViewRecord<'a> { pub repost_count: std::option::Option, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, + ///The record data itself. #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs b/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs index 4911a6c..6f8759b 100644 --- a/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs +++ b/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct RecordWithMedia<'a> { #[serde(borrow)] pub record: crate::app_bsky::embed::record::Record<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -19,6 +25,7 @@ pub enum RecordWithMediaRecordMedia<'a> { #[serde(rename = "app.bsky.embed.external")] External(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -28,6 +35,7 @@ pub struct View<'a> { #[serde(borrow)] pub record: crate::app_bsky::embed::record::View<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -39,4 +47,4 @@ pub enum ViewRecordMedia<'a> { VideoView(Box>), #[serde(rename = "app.bsky.embed.external#view")] ExternalView(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/embed/video.rs b/crates/jacquard-api/src/app_bsky/embed/video.rs index 0abc8f9..a8625c8 100644 --- a/crates/jacquard-api/src/app_bsky/embed/video.rs +++ b/crates/jacquard-api/src/app_bsky/embed/video.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,10 +11,12 @@ pub struct Caption<'a> { pub file: jacquard_common::types::blob::Blob<'a>, pub lang: jacquard_common::types::string::Language, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Video<'a> { + ///Alt text description of the video, for accessibility. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub alt: std::option::Option>, @@ -18,10 +25,12 @@ pub struct Video<'a> { pub aspect_ratio: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub captions: std::option::Option>>, + pub captions: std::option::Option>>, + ///The mp4 video file. May be up to 100mb, formerly limited to 50mb. #[serde(borrow)] pub video: jacquard_common::types::blob::Blob<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -39,4 +48,4 @@ pub struct View<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub thumbnail: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed.rs b/crates/jacquard-api/src/app_bsky/feed.rs index 6f9e5b4..de2dfbb 100644 --- a/crates/jacquard-api/src/app_bsky/feed.rs +++ b/crates/jacquard-api/src/app_bsky/feed.rs @@ -1,3 +1,33 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod describe_feed_generator; +pub mod generator; +pub mod get_actor_feeds; +pub mod get_actor_likes; +pub mod get_author_feed; +pub mod get_feed; +pub mod get_feed_generator; +pub mod get_feed_generators; +pub mod get_feed_skeleton; +pub mod get_likes; +pub mod get_list_feed; +pub mod get_post_thread; +pub mod get_posts; +pub mod get_quotes; +pub mod get_reposted_by; +pub mod get_suggested_feeds; +pub mod get_timeline; +pub mod like; +pub mod post; +pub mod postgate; +pub mod repost; +pub mod search_posts; +pub mod send_interactions; +pub mod threadgate; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,35 +38,40 @@ pub struct BlockedAuthor<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct BlockedPost<'a> { #[serde(borrow)] - pub author: jacquard_common::types::value::Data<'a>, + pub author: crate::app_bsky::feed::BlockedAuthor<'a>, pub blocked: bool, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct FeedViewPost<'a> { + ///Context provided by feed generator that may be passed back alongside interactions. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub feed_context: std::option::Option>, #[serde(borrow)] - pub post: jacquard_common::types::value::Data<'a>, + pub post: crate::app_bsky::feed::PostView<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub reason: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub reply: std::option::Option>, + pub reply: std::option::Option>, + ///Unique identifier per request that may be passed back alongside interactions. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub req_id: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -80,8 +115,9 @@ pub struct GeneratorView<'a> { pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub viewer: std::option::Option>, + pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -90,6 +126,7 @@ pub struct GeneratorViewerState<'a> { #[serde(borrow)] pub like: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -97,16 +134,19 @@ pub struct Interaction<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub event: std::option::Option>, + ///Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub feed_context: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub item: std::option::Option>, + ///Unique identifier per request that may be passed back alongside interactions. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub req_id: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -115,6 +155,7 @@ pub struct NotFoundPost<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -144,13 +185,14 @@ pub struct PostView<'a> { pub repost_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub threadgate: std::option::Option>, + pub threadgate: std::option::Option>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub viewer: std::option::Option>, + pub viewer: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -167,6 +209,7 @@ pub enum PostViewRecordEmbed<'a> { #[serde(rename = "app.bsky.embed.recordWithMedia#view")] RecordWithMediaView(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -185,10 +228,12 @@ pub struct ReasonRepost<'a> { #[serde(borrow)] pub uri: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ReplyRef<'a> { + ///When parent is a reply to another post, this is the author of that post. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub grandparent_author: std::option::Option< @@ -199,6 +244,7 @@ pub struct ReplyRef<'a> { #[serde(borrow)] pub root: ReplyRefRecordRoot<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -213,6 +259,7 @@ pub enum ReplyRefRecordRoot<'a> {} #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SkeletonFeedPost<'a> { + ///Context that will be passed through to client and may be passed to feed generator back alongside interactions. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub feed_context: std::option::Option>, @@ -222,6 +269,7 @@ pub struct SkeletonFeedPost<'a> { #[serde(borrow)] pub reason: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -238,6 +286,7 @@ pub struct SkeletonReasonRepost<'a> { #[serde(borrow)] pub repost: jacquard_common::types::string::AtUri<'a>, } + ///Metadata about this post within the context of the thread it is in. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -247,6 +296,7 @@ pub struct ThreadContext<'a> { #[serde(borrow)] pub root_author_like: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -255,14 +305,15 @@ pub struct ThreadViewPost<'a> { #[serde(borrow)] pub parent: std::option::Option>, #[serde(borrow)] - pub post: jacquard_common::types::value::Data<'a>, + pub post: crate::app_bsky::feed::PostView<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub replies: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub thread_context: std::option::Option>, + pub thread_context: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -285,6 +336,7 @@ pub struct ThreadgateView<'a> { #[serde(borrow)] pub uri: std::option::Option>, } + ///Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -306,28 +358,4 @@ pub struct ViewerState<'a> { pub repost: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub thread_muted: std::option::Option, -} -pub mod describe_feed_generator; -pub mod generator; -pub mod get_actor_feeds; -pub mod get_actor_likes; -pub mod get_author_feed; -pub mod get_feed; -pub mod get_feed_generator; -pub mod get_feed_generators; -pub mod get_feed_skeleton; -pub mod get_likes; -pub mod get_list_feed; -pub mod get_post_thread; -pub mod get_posts; -pub mod get_quotes; -pub mod get_reposted_by; -pub mod get_suggested_feeds; -pub mod get_timeline; -pub mod like; -pub mod post; -pub mod postgate; -pub mod repost; -pub mod search_posts; -pub mod send_interactions; -pub mod threadgate; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/describe_feed_generator.rs b/crates/jacquard-api/src/app_bsky/feed/describe_feed_generator.rs index 1627e66..279bac5 100644 --- a/crates/jacquard-api/src/app_bsky/feed/describe_feed_generator.rs +++ b/crates/jacquard-api/src/app_bsky/feed/describe_feed_generator.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,6 +10,7 @@ pub struct Feed<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,6 +22,7 @@ pub struct Links<'a> { #[serde(borrow)] pub terms_of_service: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -27,4 +34,4 @@ pub struct DescribeFeedGeneratorOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub links: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/generator.rs b/crates/jacquard-api/src/app_bsky/feed/generator.rs index 0a97d54..95ba2e0 100644 --- a/crates/jacquard-api/src/app_bsky/feed/generator.rs +++ b/crates/jacquard-api/src/app_bsky/feed/generator.rs @@ -1,8 +1,14 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Generator<'a> { + ///Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions #[serde(skip_serializing_if = "std::option::Option::is_none")] pub accepts_interactions: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -24,10 +30,12 @@ pub struct Generator<'a> { pub did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub display_name: jacquard_common::CowStr<'a>, + ///Self-label values #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -35,4 +43,4 @@ pub struct Generator<'a> { pub enum GeneratorRecordLabels<'a> { #[serde(rename = "com.atproto.label.defs#selfLabels")] DefsSelfLabels(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_actor_feeds.rs b/crates/jacquard-api/src/app_bsky/feed/get_actor_feeds.rs index ebf3f43..1bf3e15 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_actor_feeds.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_actor_feeds.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetActorFeedsParams<'a> { @@ -9,6 +14,7 @@ pub struct GetActorFeedsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,4 +24,4 @@ pub struct GetActorFeedsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub feeds: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_actor_likes.rs b/crates/jacquard-api/src/app_bsky/feed/get_actor_likes.rs index e56391f..a1dd46b 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_actor_likes.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_actor_likes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetActorLikesParams<'a> { @@ -9,6 +14,7 @@ pub struct GetActorLikesParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,6 +25,7 @@ pub struct GetActorLikesOutput<'a> { #[serde(borrow)] pub feed: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -38,6 +45,7 @@ pub enum GetActorLikesError<'a> { #[serde(rename = "BlockedByActor")] BlockedByActor(std::option::Option), } + impl std::fmt::Display for GetActorLikesError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -55,7 +63,7 @@ impl std::fmt::Display for GetActorLikesError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_author_feed.rs b/crates/jacquard-api/src/app_bsky/feed/get_author_feed.rs index 1f5f8a6..45220a6 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_author_feed.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_author_feed.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetAuthorFeedParams<'a> { @@ -14,6 +19,7 @@ pub struct GetAuthorFeedParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,6 +30,7 @@ pub struct GetAuthorFeedOutput<'a> { #[serde(borrow)] pub feed: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -43,6 +50,7 @@ pub enum GetAuthorFeedError<'a> { #[serde(rename = "BlockedByActor")] BlockedByActor(std::option::Option), } + impl std::fmt::Display for GetAuthorFeedError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -60,7 +68,7 @@ impl std::fmt::Display for GetAuthorFeedError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_feed.rs b/crates/jacquard-api/src/app_bsky/feed/get_feed.rs index 5c9979b..e7ba23e 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_feed.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_feed.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetFeedParams<'a> { @@ -9,6 +14,7 @@ pub struct GetFeedParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,6 +25,7 @@ pub struct GetFeedOutput<'a> { #[serde(borrow)] pub feed: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -36,6 +43,7 @@ pub enum GetFeedError<'a> { #[serde(rename = "UnknownFeed")] UnknownFeed(std::option::Option), } + impl std::fmt::Display for GetFeedError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -46,7 +54,7 @@ impl std::fmt::Display for GetFeedError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_feed_generator.rs b/crates/jacquard-api/src/app_bsky/feed/get_feed_generator.rs index e3f9b17..279a92a 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_feed_generator.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_feed_generator.rs @@ -1,15 +1,23 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetFeedGeneratorParams<'a> { #[serde(borrow)] pub feed: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetFeedGeneratorOutput<'a> { + ///Indicates whether the feed generator service has been online recently, or else seems to be inactive. pub is_online: bool, + ///Indicates whether the feed generator service is compatible with the record declaration. pub is_valid: bool, #[serde(borrow)] pub view: crate::app_bsky::feed::GeneratorView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_feed_generators.rs b/crates/jacquard-api/src/app_bsky/feed/get_feed_generators.rs index 208ed32..68f612d 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_feed_generators.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_feed_generators.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetFeedGeneratorsParams<'a> { #[serde(borrow)] pub feeds: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetFeedGeneratorsOutput<'a> { #[serde(borrow)] pub feeds: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_feed_skeleton.rs b/crates/jacquard-api/src/app_bsky/feed/get_feed_skeleton.rs index 702f0f0..23da2ec 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_feed_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_feed_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetFeedSkeletonParams<'a> { @@ -9,6 +14,7 @@ pub struct GetFeedSkeletonParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,10 +24,12 @@ pub struct GetFeedSkeletonOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub feed: Vec>, + ///Unique identifier per request that may be passed back alongside interactions. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub req_id: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -39,6 +47,7 @@ pub enum GetFeedSkeletonError<'a> { #[serde(rename = "UnknownFeed")] UnknownFeed(std::option::Option), } + impl std::fmt::Display for GetFeedSkeletonError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -49,7 +58,7 @@ impl std::fmt::Display for GetFeedSkeletonError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_likes.rs b/crates/jacquard-api/src/app_bsky/feed/get_likes.rs index fe3c9f6..7106528 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_likes.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_likes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct Like<'a> { pub created_at: jacquard_common::types::string::Datetime, pub indexed_at: jacquard_common::types::string::Datetime, } + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetLikesParams<'a> { @@ -21,6 +27,7 @@ pub struct GetLikesParams<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -35,4 +42,4 @@ pub struct GetLikesOutput<'a> { pub likes: Vec>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_list_feed.rs b/crates/jacquard-api/src/app_bsky/feed/get_list_feed.rs index ef9fb2a..589f84b 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_list_feed.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_list_feed.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetListFeedParams<'a> { @@ -9,6 +14,7 @@ pub struct GetListFeedParams<'a> { #[serde(borrow)] pub list: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,6 +25,7 @@ pub struct GetListFeedOutput<'a> { #[serde(borrow)] pub feed: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -36,6 +43,7 @@ pub enum GetListFeedError<'a> { #[serde(rename = "UnknownList")] UnknownList(std::option::Option), } + impl std::fmt::Display for GetListFeedError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -46,7 +54,7 @@ impl std::fmt::Display for GetListFeedError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_post_thread.rs b/crates/jacquard-api/src/app_bsky/feed/get_post_thread.rs index a34a002..127cbe1 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_post_thread.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_post_thread.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPostThreadParams<'a> { @@ -8,6 +13,7 @@ pub struct GetPostThreadParams<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,6 +24,7 @@ pub struct GetPostThreadOutput<'a> { #[serde(borrow)] pub threadgate: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -30,6 +37,7 @@ pub enum GetPostThreadOutputRecordThread<'a> { #[serde(rename = "app.bsky.feed.defs#blockedPost")] DefsBlockedPost(Box>), } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -47,6 +55,7 @@ pub enum GetPostThreadError<'a> { #[serde(rename = "NotFound")] NotFound(std::option::Option), } + impl std::fmt::Display for GetPostThreadError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -57,7 +66,7 @@ impl std::fmt::Display for GetPostThreadError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_posts.rs b/crates/jacquard-api/src/app_bsky/feed/get_posts.rs index 31a8b17..cd22e6f 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_posts.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_posts.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPostsParams<'a> { #[serde(borrow)] pub uris: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPostsOutput<'a> { #[serde(borrow)] pub posts: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_quotes.rs b/crates/jacquard-api/src/app_bsky/feed/get_quotes.rs index 1d971be..3333a82 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_quotes.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_quotes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetQuotesParams<'a> { @@ -12,6 +17,7 @@ pub struct GetQuotesParams<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -26,4 +32,4 @@ pub struct GetQuotesOutput<'a> { pub posts: Vec>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_reposted_by.rs b/crates/jacquard-api/src/app_bsky/feed/get_reposted_by.rs index 9e65e10..e054a55 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_reposted_by.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_reposted_by.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRepostedByParams<'a> { @@ -12,6 +17,7 @@ pub struct GetRepostedByParams<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -26,4 +32,4 @@ pub struct GetRepostedByOutput<'a> { pub reposted_by: Vec>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_suggested_feeds.rs b/crates/jacquard-api/src/app_bsky/feed/get_suggested_feeds.rs index 2f02505..70e7ca3 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_suggested_feeds.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_suggested_feeds.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedFeedsParams<'a> { @@ -7,6 +12,7 @@ pub struct GetSuggestedFeedsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,4 +22,4 @@ pub struct GetSuggestedFeedsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub feeds: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/get_timeline.rs b/crates/jacquard-api/src/app_bsky/feed/get_timeline.rs index e41651f..4249e74 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_timeline.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_timeline.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetTimelineParams<'a> { @@ -10,6 +15,7 @@ pub struct GetTimelineParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,4 +25,4 @@ pub struct GetTimelineOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub feed: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/like.rs b/crates/jacquard-api/src/app_bsky/feed/like.rs index f4c8dea..9a3c9c8 100644 --- a/crates/jacquard-api/src/app_bsky/feed/like.rs +++ b/crates/jacquard-api/src/app_bsky/feed/like.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Record declaring a 'like' of a piece of subject content. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -9,4 +14,4 @@ pub struct Like<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub via: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/post.rs b/crates/jacquard-api/src/app_bsky/feed/post.rs index 6531324..276c88a 100644 --- a/crates/jacquard-api/src/app_bsky/feed/post.rs +++ b/crates/jacquard-api/src/app_bsky/feed/post.rs @@ -1,44 +1,59 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Deprecated: use facets instead. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Entity<'a> { #[serde(borrow)] - pub index: jacquard_common::types::value::Data<'a>, + pub index: crate::app_bsky::feed::post::TextSlice<'a>, + ///Expected values are 'mention' and 'link'. #[serde(borrow)] pub r#type: jacquard_common::CowStr<'a>, #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } + ///Record containing a Bluesky post. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Post<'a> { + ///Client-declared timestamp when this post was originally created. pub created_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embed: std::option::Option>, + ///DEPRECATED: replaced by app.bsky.richtext.facet. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub entities: std::option::Option>>, + pub entities: std::option::Option>>, + ///Annotations of text (mentions, URLs, hashtags, etc) #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub facets: std::option::Option>>, + ///Self-label values for this post. Effectively content warnings. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>, + ///Indicates human language of post primary text content. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub langs: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub reply: std::option::Option>, + pub reply: std::option::Option>, + ///Additional hashtags, in addition to any included in post text and facets. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub tags: std::option::Option>>, + ///The primary post content. May be an empty string, if there are embeds. #[serde(borrow)] pub text: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -55,6 +70,7 @@ pub enum PostRecordEmbed<'a> { #[serde(rename = "app.bsky.embed.recordWithMedia")] RecordWithMedia(Box>), } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -63,6 +79,7 @@ pub enum PostRecordLabels<'a> { #[serde(rename = "com.atproto.label.defs#selfLabels")] DefsSelfLabels(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -72,6 +89,7 @@ pub struct ReplyRef<'a> { #[serde(borrow)] pub root: crate::com_atproto::repo::strong_ref::StrongRef<'a>, } + ///Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -79,4 +97,4 @@ pub struct ReplyRef<'a> { pub struct TextSlice<'a> { pub end: i64, pub start: i64, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/postgate.rs b/crates/jacquard-api/src/app_bsky/feed/postgate.rs index 9b8c60a..2a72497 100644 --- a/crates/jacquard-api/src/app_bsky/feed/postgate.rs +++ b/crates/jacquard-api/src/app_bsky/feed/postgate.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Disables embedding of this post. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -9,16 +14,19 @@ pub struct DisableRule<'a> {} #[serde(rename_all = "camelCase")] pub struct Postgate<'a> { pub created_at: jacquard_common::types::string::Datetime, + ///List of AT-URIs embedding this post that the author has detached from. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub detached_embedding_uris: std::option::Option< Vec>, >, + ///List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embedding_rules: std::option::Option< Vec>, >, + ///Reference (AT-URI) to the post record. #[serde(borrow)] pub post: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/repost.rs b/crates/jacquard-api/src/app_bsky/feed/repost.rs index 329e23f..9587bfc 100644 --- a/crates/jacquard-api/src/app_bsky/feed/repost.rs +++ b/crates/jacquard-api/src/app_bsky/feed/repost.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Record representing a 'repost' of an existing Bluesky post. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -9,4 +14,4 @@ pub struct Repost<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub via: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/search_posts.rs b/crates/jacquard-api/src/app_bsky/feed/search_posts.rs index 07e8d36..91321cd 100644 --- a/crates/jacquard-api/src/app_bsky/feed/search_posts.rs +++ b/crates/jacquard-api/src/app_bsky/feed/search_posts.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchPostsParams<'a> { @@ -35,6 +40,7 @@ pub struct SearchPostsParams<'a> { #[serde(borrow)] pub url: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -42,11 +48,13 @@ pub struct SearchPostsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, + ///Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hits_total: std::option::Option, #[serde(borrow)] pub posts: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -64,6 +72,7 @@ pub enum SearchPostsError<'a> { #[serde(rename = "BadQueryString")] BadQueryString(std::option::Option), } + impl std::fmt::Display for SearchPostsError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -74,7 +83,7 @@ impl std::fmt::Display for SearchPostsError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/send_interactions.rs b/crates/jacquard-api/src/app_bsky/feed/send_interactions.rs index 4b2354e..27c6883 100644 --- a/crates/jacquard-api/src/app_bsky/feed/send_interactions.rs +++ b/crates/jacquard-api/src/app_bsky/feed/send_interactions.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,7 +10,8 @@ pub struct SendInteractionsInput<'a> { #[serde(borrow)] pub interactions: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct SendInteractionsOutput<'a> {} +pub struct SendInteractionsOutput<'a> {} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/feed/threadgate.rs b/crates/jacquard-api/src/app_bsky/feed/threadgate.rs index 6caff1d..c060b07 100644 --- a/crates/jacquard-api/src/app_bsky/feed/threadgate.rs +++ b/crates/jacquard-api/src/app_bsky/feed/threadgate.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Allow replies from actors who follow you. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -16,25 +21,30 @@ pub struct ListRule<'a> { #[serde(borrow)] pub list: jacquard_common::types::string::AtUri<'a>, } + ///Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Threadgate<'a> { + ///List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub allow: std::option::Option>>, pub created_at: jacquard_common::types::string::Datetime, + ///List of hidden reply URIs. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub hidden_replies: std::option::Option< Vec>, >, + ///Reference (AT-URI) to the post record. #[serde(borrow)] pub post: jacquard_common::types::string::AtUri<'a>, } + ///Allow replies from actors mentioned in your post. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct MentionRule<'a> {} +pub struct MentionRule<'a> {} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph.rs b/crates/jacquard-api/src/app_bsky/graph.rs index ed621f8..c3f6fdc 100644 --- a/crates/jacquard-api/src/app_bsky/graph.rs +++ b/crates/jacquard-api/src/app_bsky/graph.rs @@ -1,3 +1,39 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod block; +pub mod follow; +pub mod get_actor_starter_packs; +pub mod get_blocks; +pub mod get_followers; +pub mod get_follows; +pub mod get_known_followers; +pub mod get_list; +pub mod get_list_blocks; +pub mod get_list_mutes; +pub mod get_lists; +pub mod get_lists_with_membership; +pub mod get_mutes; +pub mod get_relationships; +pub mod get_starter_pack; +pub mod get_starter_packs; +pub mod get_starter_packs_with_membership; +pub mod get_suggested_follows_by_actor; +pub mod list; +pub mod listblock; +pub mod listitem; +pub mod mute_actor; +pub mod mute_actor_list; +pub mod mute_thread; +pub mod search_starter_packs; +pub mod starterpack; +pub mod unmute_actor; +pub mod unmute_actor_list; +pub mod unmute_thread; +pub mod verification; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +43,7 @@ pub struct ListItemView<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ListPurpose<'a> { AppBskyGraphDefsModlist, @@ -14,6 +51,7 @@ pub enum ListPurpose<'a> { AppBskyGraphDefsReferencelist, Other(jacquard_common::CowStr<'a>), } + impl<'a> ListPurpose<'a> { pub fn as_str(&self) -> &str { match self { @@ -24,6 +62,7 @@ impl<'a> ListPurpose<'a> { } } } + impl<'a> From<&'a str> for ListPurpose<'a> { fn from(s: &'a str) -> Self { match s { @@ -34,6 +73,7 @@ impl<'a> From<&'a str> for ListPurpose<'a> { } } } + impl<'a> From for ListPurpose<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -44,11 +84,13 @@ impl<'a> From for ListPurpose<'a> { } } } + impl<'a> AsRef for ListPurpose<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for ListPurpose<'a> { fn serialize(&self, serializer: S) -> Result where @@ -57,6 +99,7 @@ impl<'a> serde::Serialize for ListPurpose<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for ListPurpose<'a> where 'de: 'a, @@ -69,6 +112,7 @@ where Ok(Self::from(s)) } } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -97,13 +141,14 @@ pub struct ListView<'a> { #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, #[serde(borrow)] - pub purpose: jacquard_common::types::value::Data<'a>, + pub purpose: crate::app_bsky::graph::ListPurpose<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub viewer: std::option::Option>, + pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -123,13 +168,14 @@ pub struct ListViewBasic<'a> { #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, #[serde(borrow)] - pub purpose: jacquard_common::types::value::Data<'a>, + pub purpose: crate::app_bsky::graph::ListPurpose<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub viewer: std::option::Option>, + pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -140,6 +186,7 @@ pub struct ListViewerState<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub muted: std::option::Option, } + ///indicates that a handle or DID could not be resolved #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -149,6 +196,7 @@ pub struct NotFoundActor<'a> { pub actor: jacquard_common::types::ident::AtIdentifier<'a>, pub not_found: bool, } + ///lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -156,13 +204,16 @@ pub struct NotFoundActor<'a> { pub struct Relationship<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///if the actor is followed by this DID, contains the AT-URI of the follow record #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub followed_by: std::option::Option>, + ///if the actor follows this DID, this is the AT-URI of the follow record #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub following: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -184,17 +235,18 @@ pub struct StarterPackView<'a> { pub labels: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub list: std::option::Option>, + pub list: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub list_items_sample: std::option::Option< - Vec>, + Vec>, >, #[serde(borrow)] pub record: jacquard_common::types::value::Data<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -217,34 +269,4 @@ pub struct StarterPackViewBasic<'a> { pub record: jacquard_common::types::value::Data<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, -} -pub mod block; -pub mod follow; -pub mod get_actor_starter_packs; -pub mod get_blocks; -pub mod get_followers; -pub mod get_follows; -pub mod get_known_followers; -pub mod get_list; -pub mod get_list_blocks; -pub mod get_list_mutes; -pub mod get_lists; -pub mod get_lists_with_membership; -pub mod get_mutes; -pub mod get_relationships; -pub mod get_starter_pack; -pub mod get_starter_packs; -pub mod get_starter_packs_with_membership; -pub mod get_suggested_follows_by_actor; -pub mod list; -pub mod listblock; -pub mod listitem; -pub mod mute_actor; -pub mod mute_actor_list; -pub mod mute_thread; -pub mod search_starter_packs; -pub mod starterpack; -pub mod unmute_actor; -pub mod unmute_actor_list; -pub mod unmute_thread; -pub mod verification; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/block.rs b/crates/jacquard-api/src/app_bsky/graph/block.rs index 0d4189e..3a17d8d 100644 --- a/crates/jacquard-api/src/app_bsky/graph/block.rs +++ b/crates/jacquard-api/src/app_bsky/graph/block.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Block<'a> { pub created_at: jacquard_common::types::string::Datetime, + ///DID of the account to be blocked. #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/follow.rs b/crates/jacquard-api/src/app_bsky/graph/follow.rs index c4d6cd0..fffaf49 100644 --- a/crates/jacquard-api/src/app_bsky/graph/follow.rs +++ b/crates/jacquard-api/src/app_bsky/graph/follow.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -6,4 +11,4 @@ pub struct Follow<'a> { pub created_at: jacquard_common::types::string::Datetime, #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_actor_starter_packs.rs b/crates/jacquard-api/src/app_bsky/graph/get_actor_starter_packs.rs index 143f47d..f6875ce 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_actor_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_actor_starter_packs.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetActorStarterPacksParams<'a> { @@ -9,6 +14,7 @@ pub struct GetActorStarterPacksParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,4 +24,4 @@ pub struct GetActorStarterPacksOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub starter_packs: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_blocks.rs b/crates/jacquard-api/src/app_bsky/graph/get_blocks.rs index 85966f8..2e554d3 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_blocks.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_blocks.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetBlocksParams<'a> { @@ -7,6 +12,7 @@ pub struct GetBlocksParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,4 +22,4 @@ pub struct GetBlocksOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_followers.rs b/crates/jacquard-api/src/app_bsky/graph/get_followers.rs index c77bf9a..261bf21 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_followers.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_followers.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetFollowersParams<'a> { @@ -9,6 +14,7 @@ pub struct GetFollowersParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -20,4 +26,4 @@ pub struct GetFollowersOutput<'a> { pub followers: Vec>, #[serde(borrow)] pub subject: crate::app_bsky::actor::ProfileView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_follows.rs b/crates/jacquard-api/src/app_bsky/graph/get_follows.rs index 0a26021..7827a4a 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_follows.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_follows.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetFollowsParams<'a> { @@ -9,6 +14,7 @@ pub struct GetFollowsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -20,4 +26,4 @@ pub struct GetFollowsOutput<'a> { pub follows: Vec>, #[serde(borrow)] pub subject: crate::app_bsky::actor::ProfileView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_known_followers.rs b/crates/jacquard-api/src/app_bsky/graph/get_known_followers.rs index 54f8a5d..160c479 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_known_followers.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_known_followers.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetKnownFollowersParams<'a> { @@ -9,6 +14,7 @@ pub struct GetKnownFollowersParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -20,4 +26,4 @@ pub struct GetKnownFollowersOutput<'a> { pub followers: Vec>, #[serde(borrow)] pub subject: crate::app_bsky::actor::ProfileView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_list.rs b/crates/jacquard-api/src/app_bsky/graph/get_list.rs index acbf094..617faf7 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_list.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_list.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetListParams<'a> { @@ -9,6 +14,7 @@ pub struct GetListParams<'a> { #[serde(borrow)] pub list: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -20,4 +26,4 @@ pub struct GetListOutput<'a> { pub items: Vec>, #[serde(borrow)] pub list: crate::app_bsky::graph::ListView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_list_blocks.rs b/crates/jacquard-api/src/app_bsky/graph/get_list_blocks.rs index 452ed4f..ea7de93 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_list_blocks.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_list_blocks.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetListBlocksParams<'a> { @@ -7,6 +12,7 @@ pub struct GetListBlocksParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,4 +22,4 @@ pub struct GetListBlocksOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub lists: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_list_mutes.rs b/crates/jacquard-api/src/app_bsky/graph/get_list_mutes.rs index dcee398..ddee64b 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_list_mutes.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_list_mutes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetListMutesParams<'a> { @@ -7,6 +12,7 @@ pub struct GetListMutesParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,4 +22,4 @@ pub struct GetListMutesOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub lists: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_lists.rs b/crates/jacquard-api/src/app_bsky/graph/get_lists.rs index bfdb534..0cb1d18 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_lists.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_lists.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetListsParams<'a> { @@ -12,6 +17,7 @@ pub struct GetListsParams<'a> { #[serde(borrow)] pub purposes: std::option::Option>>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -21,4 +27,4 @@ pub struct GetListsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub lists: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_lists_with_membership.rs b/crates/jacquard-api/src/app_bsky/graph/get_lists_with_membership.rs index 85b51da..33aa819 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_lists_with_membership.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_lists_with_membership.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///A list and an optional list item indicating membership of a target user to that list. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -9,6 +14,7 @@ pub struct ListWithMembership<'a> { #[serde(borrow)] pub list_item: std::option::Option>, } + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetListsWithMembershipParams<'a> { @@ -23,6 +29,7 @@ pub struct GetListsWithMembershipParams<'a> { #[serde(borrow)] pub purposes: std::option::Option>>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -32,4 +39,4 @@ pub struct GetListsWithMembershipOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub lists_with_membership: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_mutes.rs b/crates/jacquard-api/src/app_bsky/graph/get_mutes.rs index 1a1b803..9abf75f 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_mutes.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_mutes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetMutesParams<'a> { @@ -7,6 +12,7 @@ pub struct GetMutesParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,4 +22,4 @@ pub struct GetMutesOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub mutes: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_relationships.rs b/crates/jacquard-api/src/app_bsky/graph/get_relationships.rs index 9956c73..d68925a 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_relationships.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_relationships.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRelationshipsParams<'a> { @@ -9,6 +14,7 @@ pub struct GetRelationshipsParams<'a> { Vec>, >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,6 +25,7 @@ pub struct GetRelationshipsOutput<'a> { #[serde(borrow)] pub relationships: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -37,6 +44,7 @@ pub enum GetRelationshipsError<'a> { #[serde(rename = "ActorNotFound")] ActorNotFound(std::option::Option), } + impl std::fmt::Display for GetRelationshipsError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -47,7 +55,7 @@ impl std::fmt::Display for GetRelationshipsError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_starter_pack.rs b/crates/jacquard-api/src/app_bsky/graph/get_starter_pack.rs index cec58bf..d58c518 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_starter_pack.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_starter_pack.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetStarterPackParams<'a> { #[serde(borrow)] pub starter_pack: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetStarterPackOutput<'a> { #[serde(borrow)] pub starter_pack: crate::app_bsky::graph::StarterPackView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_starter_packs.rs b/crates/jacquard-api/src/app_bsky/graph/get_starter_packs.rs index a005eae..de1e503 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_starter_packs.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetStarterPacksParams<'a> { #[serde(borrow)] pub uris: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetStarterPacksOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_starter_packs_with_membership.rs b/crates/jacquard-api/src/app_bsky/graph/get_starter_packs_with_membership.rs index 2ce6563..2137546 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_starter_packs_with_membership.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_starter_packs_with_membership.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetStarterPacksWithMembershipParams<'a> { @@ -9,6 +14,7 @@ pub struct GetStarterPacksWithMembershipParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,6 +25,7 @@ pub struct GetStarterPacksWithMembershipOutput<'a> { #[serde(borrow)] pub starter_packs_with_membership: Vec>, } + ///A starter pack and an optional list item indicating membership of a target user to that starter pack. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -29,4 +36,4 @@ pub struct StarterPackWithMembership<'a> { pub list_item: std::option::Option>, #[serde(borrow)] pub starter_pack: crate::app_bsky::graph::StarterPackView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/get_suggested_follows_by_actor.rs b/crates/jacquard-api/src/app_bsky/graph/get_suggested_follows_by_actor.rs index 1c5c47a..219955c 100644 --- a/crates/jacquard-api/src/app_bsky/graph/get_suggested_follows_by_actor.rs +++ b/crates/jacquard-api/src/app_bsky/graph/get_suggested_follows_by_actor.rs @@ -1,17 +1,25 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedFollowsByActorParams<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedFollowsByActorOutput<'a> { + ///If true, response has fallen-back to generic results, and is not scoped using relativeToDid #[serde(skip_serializing_if = "std::option::Option::is_none")] pub is_fallback: std::option::Option, + ///Snowflake for this recommendation, use when submitting recommendation events. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub rec_id: std::option::Option, #[serde(borrow)] pub suggestions: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/list.rs b/crates/jacquard-api/src/app_bsky/graph/list.rs index 21d8fcb..1c71ac0 100644 --- a/crates/jacquard-api/src/app_bsky/graph/list.rs +++ b/crates/jacquard-api/src/app_bsky/graph/list.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -18,11 +23,14 @@ pub struct List<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>, + ///Display name for list; can not be empty. #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, + ///Defines the purpose of the list (aka, moderation-oriented or curration-oriented) #[serde(borrow)] pub purpose: crate::app_bsky::graph::ListPurpose<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -30,4 +38,4 @@ pub struct List<'a> { pub enum ListRecordLabels<'a> { #[serde(rename = "com.atproto.label.defs#selfLabels")] DefsSelfLabels(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/listblock.rs b/crates/jacquard-api/src/app_bsky/graph/listblock.rs index a97820b..e459642 100644 --- a/crates/jacquard-api/src/app_bsky/graph/listblock.rs +++ b/crates/jacquard-api/src/app_bsky/graph/listblock.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Record representing a block relationship against an entire an entire list of accounts (actors). #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Listblock<'a> { pub created_at: jacquard_common::types::string::Datetime, + ///Reference (AT-URI) to the mod list record. #[serde(borrow)] pub subject: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/listitem.rs b/crates/jacquard-api/src/app_bsky/graph/listitem.rs index e0ed115..44b2c25 100644 --- a/crates/jacquard-api/src/app_bsky/graph/listitem.rs +++ b/crates/jacquard-api/src/app_bsky/graph/listitem.rs @@ -1,11 +1,18 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Listitem<'a> { pub created_at: jacquard_common::types::string::Datetime, + ///Reference (AT-URI) to the list record (app.bsky.graph.list). #[serde(borrow)] pub list: jacquard_common::types::string::AtUri<'a>, + ///The account which is included on the list. #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/mute_actor.rs b/crates/jacquard-api/src/app_bsky/graph/mute_actor.rs index 21a11b9..f211c1a 100644 --- a/crates/jacquard-api/src/app_bsky/graph/mute_actor.rs +++ b/crates/jacquard-api/src/app_bsky/graph/mute_actor.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MuteActorInput<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/mute_actor_list.rs b/crates/jacquard-api/src/app_bsky/graph/mute_actor_list.rs index 3861bbb..f149e2b 100644 --- a/crates/jacquard-api/src/app_bsky/graph/mute_actor_list.rs +++ b/crates/jacquard-api/src/app_bsky/graph/mute_actor_list.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MuteActorListInput<'a> { #[serde(borrow)] pub list: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/mute_thread.rs b/crates/jacquard-api/src/app_bsky/graph/mute_thread.rs index ba01233..e6a1cfe 100644 --- a/crates/jacquard-api/src/app_bsky/graph/mute_thread.rs +++ b/crates/jacquard-api/src/app_bsky/graph/mute_thread.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MuteThreadInput<'a> { #[serde(borrow)] pub root: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/search_starter_packs.rs b/crates/jacquard-api/src/app_bsky/graph/search_starter_packs.rs index 7604335..cc93ead 100644 --- a/crates/jacquard-api/src/app_bsky/graph/search_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/graph/search_starter_packs.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchStarterPacksParams<'a> { @@ -9,6 +14,7 @@ pub struct SearchStarterPacksParams<'a> { #[serde(borrow)] pub q: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,4 +24,4 @@ pub struct SearchStarterPacksOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub starter_packs: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/starterpack.rs b/crates/jacquard-api/src/app_bsky/graph/starterpack.rs index b72f618..5eafaef 100644 --- a/crates/jacquard-api/src/app_bsky/graph/starterpack.rs +++ b/crates/jacquard-api/src/app_bsky/graph/starterpack.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,6 +10,7 @@ pub struct FeedItem<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + ///Record defining a starter pack of actors and feeds for new users. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -21,9 +27,13 @@ pub struct Starterpack<'a> { >, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub feeds: std::option::Option>>, + pub feeds: std::option::Option< + Vec>, + >, + ///Reference (AT-URI) to the list record. #[serde(borrow)] pub list: jacquard_common::types::string::AtUri<'a>, + ///Display name for starter pack; can not be empty. #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/unmute_actor.rs b/crates/jacquard-api/src/app_bsky/graph/unmute_actor.rs index 725f0ca..221c1ad 100644 --- a/crates/jacquard-api/src/app_bsky/graph/unmute_actor.rs +++ b/crates/jacquard-api/src/app_bsky/graph/unmute_actor.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UnmuteActorInput<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/unmute_actor_list.rs b/crates/jacquard-api/src/app_bsky/graph/unmute_actor_list.rs index 363464a..fa5ed17 100644 --- a/crates/jacquard-api/src/app_bsky/graph/unmute_actor_list.rs +++ b/crates/jacquard-api/src/app_bsky/graph/unmute_actor_list.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UnmuteActorListInput<'a> { #[serde(borrow)] pub list: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/unmute_thread.rs b/crates/jacquard-api/src/app_bsky/graph/unmute_thread.rs index 7d36214..a33f0ac 100644 --- a/crates/jacquard-api/src/app_bsky/graph/unmute_thread.rs +++ b/crates/jacquard-api/src/app_bsky/graph/unmute_thread.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UnmuteThreadInput<'a> { #[serde(borrow)] pub root: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/graph/verification.rs b/crates/jacquard-api/src/app_bsky/graph/verification.rs index c286130..ba599e4 100644 --- a/crates/jacquard-api/src/app_bsky/graph/verification.rs +++ b/crates/jacquard-api/src/app_bsky/graph/verification.rs @@ -1,13 +1,22 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Verification<'a> { + ///Date of when the verification was created. pub created_at: jacquard_common::types::string::Datetime, + ///Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. #[serde(borrow)] pub display_name: jacquard_common::CowStr<'a>, + ///Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, + ///DID of the subject the verification applies to. #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/labeler.rs b/crates/jacquard-api/src/app_bsky/labeler.rs index 68285ca..a36fcef 100644 --- a/crates/jacquard-api/src/app_bsky/labeler.rs +++ b/crates/jacquard-api/src/app_bsky/labeler.rs @@ -1,15 +1,26 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_services; +pub mod service; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct LabelerPolicies<'a> { + ///Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub label_value_definitions: std::option::Option< Vec>, >, + ///The label values which this labeler publishes. May include global or custom labels. #[serde(borrow)] pub label_values: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -28,8 +39,9 @@ pub struct LabelerView<'a> { pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub viewer: std::option::Option>, + pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -46,16 +58,19 @@ pub struct LabelerViewDetailed<'a> { pub like_count: std::option::Option, #[serde(borrow)] pub policies: crate::app_bsky::labeler::LabelerPolicies<'a>, + ///The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub reason_types: std::option::Option< Vec>, >, + ///Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_collections: std::option::Option< Vec>, >, + ///The set of subject types (account, record, etc) this service accepts reports on. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_types: std::option::Option< @@ -65,8 +80,9 @@ pub struct LabelerViewDetailed<'a> { pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub viewer: std::option::Option>, + pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -74,6 +90,4 @@ pub struct LabelerViewerState<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub like: std::option::Option>, -} -pub mod get_services; -pub mod service; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/labeler/get_services.rs b/crates/jacquard-api/src/app_bsky/labeler/get_services.rs index b3cfb27..c1018f6 100644 --- a/crates/jacquard-api/src/app_bsky/labeler/get_services.rs +++ b/crates/jacquard-api/src/app_bsky/labeler/get_services.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetServicesParams<'a> { @@ -6,10 +11,11 @@ pub struct GetServicesParams<'a> { #[serde(borrow)] pub dids: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetServicesOutput<'a> { #[serde(borrow)] pub views: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/labeler/service.rs b/crates/jacquard-api/src/app_bsky/labeler/service.rs index a7214e3..b0dfa44 100644 --- a/crates/jacquard-api/src/app_bsky/labeler/service.rs +++ b/crates/jacquard-api/src/app_bsky/labeler/service.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///A declaration of the existence of labeler service. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -9,22 +14,26 @@ pub struct Service<'a> { pub labels: std::option::Option>, #[serde(borrow)] pub policies: crate::app_bsky::labeler::LabelerPolicies<'a>, + ///The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub reason_types: std::option::Option< Vec>, >, + ///Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_collections: std::option::Option< Vec>, >, + ///The set of subject types (account, record, etc) this service accepts reports on. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_types: std::option::Option< Vec>, >, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -32,4 +41,4 @@ pub struct Service<'a> { pub enum ServiceRecordLabels<'a> { #[serde(rename = "com.atproto.label.defs#selfLabels")] DefsSelfLabels(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification.rs b/crates/jacquard-api/src/app_bsky/notification.rs index 60ae353..a7443e3 100644 --- a/crates/jacquard-api/src/app_bsky/notification.rs +++ b/crates/jacquard-api/src/app_bsky/notification.rs @@ -1,3 +1,20 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod declaration; +pub mod get_preferences; +pub mod get_unread_count; +pub mod list_activity_subscriptions; +pub mod list_notifications; +pub mod put_activity_subscription; +pub mod put_preferences; +pub mod put_preferences_v2; +pub mod register_push; +pub mod unregister_push; +pub mod update_seen; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,6 +22,7 @@ pub struct ActivitySubscription<'a> { pub post: bool, pub reply: bool, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -13,6 +31,7 @@ pub struct ChatPreference<'a> { pub include: jacquard_common::CowStr<'a>, pub push: bool, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,6 +41,7 @@ pub struct FilterablePreference<'a> { pub list: bool, pub push: bool, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -29,37 +49,39 @@ pub struct Preference<'a> { pub list: bool, pub push: bool, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Preferences<'a> { #[serde(borrow)] - pub chat: jacquard_common::types::value::Data<'a>, + pub chat: crate::app_bsky::notification::ChatPreference<'a>, #[serde(borrow)] - pub follow: jacquard_common::types::value::Data<'a>, + pub follow: crate::app_bsky::notification::FilterablePreference<'a>, #[serde(borrow)] - pub like: jacquard_common::types::value::Data<'a>, + pub like: crate::app_bsky::notification::FilterablePreference<'a>, #[serde(borrow)] - pub like_via_repost: jacquard_common::types::value::Data<'a>, + pub like_via_repost: crate::app_bsky::notification::FilterablePreference<'a>, #[serde(borrow)] - pub mention: jacquard_common::types::value::Data<'a>, + pub mention: crate::app_bsky::notification::FilterablePreference<'a>, #[serde(borrow)] - pub quote: jacquard_common::types::value::Data<'a>, + pub quote: crate::app_bsky::notification::FilterablePreference<'a>, #[serde(borrow)] - pub reply: jacquard_common::types::value::Data<'a>, + pub reply: crate::app_bsky::notification::FilterablePreference<'a>, #[serde(borrow)] - pub repost: jacquard_common::types::value::Data<'a>, + pub repost: crate::app_bsky::notification::FilterablePreference<'a>, #[serde(borrow)] - pub repost_via_repost: jacquard_common::types::value::Data<'a>, + pub repost_via_repost: crate::app_bsky::notification::FilterablePreference<'a>, #[serde(borrow)] - pub starterpack_joined: jacquard_common::types::value::Data<'a>, + pub starterpack_joined: crate::app_bsky::notification::Preference<'a>, #[serde(borrow)] - pub subscribed_post: jacquard_common::types::value::Data<'a>, + pub subscribed_post: crate::app_bsky::notification::Preference<'a>, #[serde(borrow)] - pub unverified: jacquard_common::types::value::Data<'a>, + pub unverified: crate::app_bsky::notification::Preference<'a>, #[serde(borrow)] - pub verified: jacquard_common::types::value::Data<'a>, + pub verified: crate::app_bsky::notification::Preference<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -70,18 +92,7 @@ pub struct RecordDeleted<'a> {} #[serde(rename_all = "camelCase")] pub struct SubjectActivitySubscription<'a> { #[serde(borrow)] - pub activity_subscription: jacquard_common::types::value::Data<'a>, + pub activity_subscription: crate::app_bsky::notification::ActivitySubscription<'a>, #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, -} -pub mod declaration; -pub mod get_preferences; -pub mod get_unread_count; -pub mod list_activity_subscriptions; -pub mod list_notifications; -pub mod put_activity_subscription; -pub mod put_preferences; -pub mod put_preferences_v2; -pub mod register_push; -pub mod unregister_push; -pub mod update_seen; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/declaration.rs b/crates/jacquard-api/src/app_bsky/notification/declaration.rs index 489e130..5d85c9d 100644 --- a/crates/jacquard-api/src/app_bsky/notification/declaration.rs +++ b/crates/jacquard-api/src/app_bsky/notification/declaration.rs @@ -1,8 +1,14 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///A declaration of the user's choices related to notifications that can be produced by them. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Declaration<'a> { + ///A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. #[serde(borrow)] pub allow_subscriptions: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/get_preferences.rs b/crates/jacquard-api/src/app_bsky/notification/get_preferences.rs index 06d7c28..4a434ab 100644 --- a/crates/jacquard-api/src/app_bsky/notification/get_preferences.rs +++ b/crates/jacquard-api/src/app_bsky/notification/get_preferences.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPreferencesParams {} @@ -7,4 +12,4 @@ pub struct GetPreferencesParams {} pub struct GetPreferencesOutput<'a> { #[serde(borrow)] pub preferences: crate::app_bsky::notification::Preferences<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/get_unread_count.rs b/crates/jacquard-api/src/app_bsky/notification/get_unread_count.rs index 2a41c78..f4ee64a 100644 --- a/crates/jacquard-api/src/app_bsky/notification/get_unread_count.rs +++ b/crates/jacquard-api/src/app_bsky/notification/get_unread_count.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetUnreadCountParams { @@ -6,9 +11,10 @@ pub struct GetUnreadCountParams { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub seen_at: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetUnreadCountOutput<'a> { pub count: i64, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/list_activity_subscriptions.rs b/crates/jacquard-api/src/app_bsky/notification/list_activity_subscriptions.rs index 923222f..589c81a 100644 --- a/crates/jacquard-api/src/app_bsky/notification/list_activity_subscriptions.rs +++ b/crates/jacquard-api/src/app_bsky/notification/list_activity_subscriptions.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListActivitySubscriptionsParams<'a> { @@ -7,6 +12,7 @@ pub struct ListActivitySubscriptionsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,4 +22,4 @@ pub struct ListActivitySubscriptionsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub subscriptions: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs b/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs index 5ffef6a..7c0a10d 100644 --- a/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs +++ b/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListNotificationsParams<'a> { @@ -14,6 +19,7 @@ pub struct ListNotificationsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub seen_at: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -28,6 +34,7 @@ pub struct ListNotificationsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub seen_at: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -41,6 +48,7 @@ pub struct Notification<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, + ///The reason why this notification was delivered - e.g. your post was liked, or you received a new follower. #[serde(borrow)] pub reason: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -50,4 +58,4 @@ pub struct Notification<'a> { pub record: jacquard_common::types::value::Data<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs b/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs index 293875e..38ca150 100644 --- a/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs +++ b/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct PutActivitySubscriptionInput<'a> { #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,4 +24,4 @@ pub struct PutActivitySubscriptionOutput<'a> { >, #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/put_preferences.rs b/crates/jacquard-api/src/app_bsky/notification/put_preferences.rs index 67a772c..58b83a2 100644 --- a/crates/jacquard-api/src/app_bsky/notification/put_preferences.rs +++ b/crates/jacquard-api/src/app_bsky/notification/put_preferences.rs @@ -1,6 +1,11 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct PutPreferencesInput<'a> { pub priority: bool, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/put_preferences_v2.rs b/crates/jacquard-api/src/app_bsky/notification/put_preferences_v2.rs index 430b1da..ae91485 100644 --- a/crates/jacquard-api/src/app_bsky/notification/put_preferences_v2.rs +++ b/crates/jacquard-api/src/app_bsky/notification/put_preferences_v2.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -62,10 +67,11 @@ pub struct PutPreferencesV2Input<'a> { #[serde(borrow)] pub verified: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct PutPreferencesV2Output<'a> { #[serde(borrow)] pub preferences: crate::app_bsky::notification::Preferences<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/register_push.rs b/crates/jacquard-api/src/app_bsky/notification/register_push.rs index e016588..8a2642f 100644 --- a/crates/jacquard-api/src/app_bsky/notification/register_push.rs +++ b/crates/jacquard-api/src/app_bsky/notification/register_push.rs @@ -1,7 +1,13 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RegisterPushInput<'a> { + ///Set to true when the actor is age restricted #[serde(skip_serializing_if = "std::option::Option::is_none")] pub age_restricted: std::option::Option, #[serde(borrow)] @@ -12,4 +18,4 @@ pub struct RegisterPushInput<'a> { pub service_did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub token: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs b/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs index 7d07ba1..7a8d084 100644 --- a/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs +++ b/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -10,4 +15,4 @@ pub struct UnregisterPushInput<'a> { pub service_did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub token: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/notification/update_seen.rs b/crates/jacquard-api/src/app_bsky/notification/update_seen.rs index 6ecfe31..b7fd3f5 100644 --- a/crates/jacquard-api/src/app_bsky/notification/update_seen.rs +++ b/crates/jacquard-api/src/app_bsky/notification/update_seen.rs @@ -1,6 +1,11 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpdateSeenInput<'a> { pub seen_at: jacquard_common::types::string::Datetime, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/richtext.rs b/crates/jacquard-api/src/app_bsky/richtext.rs index d9893e8..b7b3177 100644 --- a/crates/jacquard-api/src/app_bsky/richtext.rs +++ b/crates/jacquard-api/src/app_bsky/richtext.rs @@ -1 +1,6 @@ -pub mod facet; +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod facet; \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/richtext/facet.rs b/crates/jacquard-api/src/app_bsky/richtext/facet.rs index 0cc18f8..77de7bf 100644 --- a/crates/jacquard-api/src/app_bsky/richtext/facet.rs +++ b/crates/jacquard-api/src/app_bsky/richtext/facet.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -6,6 +11,7 @@ pub struct ByteSlice<'a> { pub byte_end: i64, pub byte_start: i64, } + ///Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -14,6 +20,7 @@ pub struct Link<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::Uri<'a>, } + ///Annotation of a sub-string within rich text. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -22,8 +29,9 @@ pub struct Facet<'a> { #[serde(borrow)] pub features: Vec>, #[serde(borrow)] - pub index: jacquard_common::types::value::Data<'a>, + pub index: crate::app_bsky::richtext::facet::ByteSlice<'a>, } + ///Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -32,6 +40,7 @@ pub struct Mention<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + ///Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -39,4 +48,4 @@ pub struct Mention<'a> { pub struct Tag<'a> { #[serde(borrow)] pub tag: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced.rs b/crates/jacquard-api/src/app_bsky/unspecced.rs index f8c8fbf..6973c79 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced.rs @@ -1,39 +1,79 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_age_assurance_state; +pub mod get_config; +pub mod get_onboarding_suggested_starter_packs; +pub mod get_onboarding_suggested_starter_packs_skeleton; +pub mod get_popular_feed_generators; +pub mod get_post_thread_other_v2; +pub mod get_post_thread_v2; +pub mod get_suggested_feeds; +pub mod get_suggested_feeds_skeleton; +pub mod get_suggested_starter_packs; +pub mod get_suggested_starter_packs_skeleton; +pub mod get_suggested_users; +pub mod get_suggested_users_skeleton; +pub mod get_suggestions_skeleton; +pub mod get_tagged_suggestions; +pub mod get_trending_topics; +pub mod get_trends; +pub mod get_trends_skeleton; +pub mod init_age_assurance; +pub mod search_actors_skeleton; +pub mod search_posts_skeleton; +pub mod search_starter_packs_skeleton; + ///Object used to store age assurance data in stash. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AgeAssuranceEvent<'a> { + ///The unique identifier for this instance of the age assurance flow, in UUID format. #[serde(borrow)] pub attempt_id: jacquard_common::CowStr<'a>, + ///The IP address used when completing the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub complete_ip: std::option::Option>, + ///The user agent used when completing the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub complete_ua: std::option::Option>, + ///The date and time of this write operation. pub created_at: jacquard_common::types::string::Datetime, + ///The email used for AA. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub email: std::option::Option>, + ///The IP address used when initiating the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub init_ip: std::option::Option>, + ///The user agent used when initiating the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub init_ua: std::option::Option>, + ///The status of the age assurance process. #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, } + ///The computed state of the age assurance process, returned to the user in question on certain authenticated requests. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AgeAssuranceState<'a> { + ///The timestamp when this state was last updated. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub last_initiated_at: std::option::Option, + ///The status of the age assurance process. #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -41,6 +81,7 @@ pub struct SkeletonSearchActor<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -48,6 +89,7 @@ pub struct SkeletonSearchPost<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -55,6 +97,7 @@ pub struct SkeletonSearchStarterPack<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -76,6 +119,7 @@ pub struct SkeletonTrend<'a> { #[serde(borrow)] pub topic: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -83,6 +127,7 @@ pub struct ThreadItemBlocked<'a> { #[serde(borrow)] pub author: crate::app_bsky::feed::BlockedAuthor<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -95,14 +140,20 @@ pub struct ThreadItemNotFound<'a> {} #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ThreadItemPost<'a> { + ///The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. pub hidden_by_threadgate: bool, + ///This post has more parents that were not present in the response. This is just a boolean, without the number of parents. pub more_parents: bool, + ///This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate. pub more_replies: i64, + ///This is by an account muted by the viewer requesting it. pub muted_by_viewer: bool, + ///This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread. pub op_thread: bool, #[serde(borrow)] pub post: crate::app_bsky::feed::PostView<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -124,6 +175,7 @@ pub struct TrendView<'a> { #[serde(borrow)] pub topic: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -138,26 +190,4 @@ pub struct TrendingTopic<'a> { pub link: jacquard_common::CowStr<'a>, #[serde(borrow)] pub topic: jacquard_common::CowStr<'a>, -} -pub mod get_age_assurance_state; -pub mod get_config; -pub mod get_onboarding_suggested_starter_packs; -pub mod get_onboarding_suggested_starter_packs_skeleton; -pub mod get_popular_feed_generators; -pub mod get_post_thread_other_v2; -pub mod get_post_thread_v2; -pub mod get_suggested_feeds; -pub mod get_suggested_feeds_skeleton; -pub mod get_suggested_starter_packs; -pub mod get_suggested_starter_packs_skeleton; -pub mod get_suggested_users; -pub mod get_suggested_users_skeleton; -pub mod get_suggestions_skeleton; -pub mod get_tagged_suggestions; -pub mod get_trending_topics; -pub mod get_trends; -pub mod get_trends_skeleton; -pub mod init_age_assurance; -pub mod search_actors_skeleton; -pub mod search_posts_skeleton; -pub mod search_starter_packs_skeleton; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_age_assurance_state.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_age_assurance_state.rs index 13d6b76..c91d88a 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_age_assurance_state.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_age_assurance_state.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,4 +10,4 @@ pub struct GetAgeAssuranceStateOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::app_bsky::unspecced::AgeAssuranceState<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_config.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_config.rs index 21d3e29..671ce94 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_config.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_config.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct LiveNowConfig<'a> { #[serde(borrow)] pub domains: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,4 +22,4 @@ pub struct GetConfigOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub live_now: std::option::Option>>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs.rs index fe74cae..acd3c75 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetOnboardingSuggestedStarterPacksParams { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetOnboardingSuggestedStarterPacksOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs_skeleton.rs index 87da563..fba78d3 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_onboarding_suggested_starter_packs_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetOnboardingSuggestedStarterPacksSkeletonParams<'a> { @@ -7,10 +12,11 @@ pub struct GetOnboardingSuggestedStarterPacksSkeletonParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetOnboardingSuggestedStarterPacksSkeletonOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_popular_feed_generators.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_popular_feed_generators.rs index 77594f5..6f56348 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_popular_feed_generators.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_popular_feed_generators.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPopularFeedGeneratorsParams<'a> { @@ -10,6 +15,7 @@ pub struct GetPopularFeedGeneratorsParams<'a> { #[serde(borrow)] pub query: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,4 +25,4 @@ pub struct GetPopularFeedGeneratorsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub feeds: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs index 42ef2fe..16ad656 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPostThreadOtherV2Params<'a> { @@ -6,23 +11,28 @@ pub struct GetPostThreadOtherV2Params<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub prioritize_followed_users: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPostThreadOtherV2Output<'a> { + ///A flat list of other thread items. The depth of each item is indicated by the depth property inside the item. #[serde(borrow)] pub thread: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ThreadItem<'a> { + ///The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. pub depth: i64, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: ThreadItemRecordValue<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -30,4 +40,4 @@ pub struct ThreadItem<'a> { pub enum ThreadItemRecordValue<'a> { #[serde(rename = "app.bsky.unspecced.defs#threadItemPost")] DefsThreadItemPost(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs index 170b6ac..b1c73e9 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPostThreadV2Params<'a> { @@ -15,27 +20,33 @@ pub struct GetPostThreadV2Params<'a> { #[serde(borrow)] pub sort: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetPostThreadV2Output<'a> { + ///Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. pub has_other_replies: bool, + ///A flat list of thread items. The depth of each item is indicated by the depth property inside the item. #[serde(borrow)] pub thread: Vec>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub threadgate: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ThreadItem<'a> { + ///The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. pub depth: i64, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: ThreadItemRecordValue<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -51,4 +62,4 @@ pub enum ThreadItemRecordValue<'a> { DefsThreadItemNotFound(Box>), #[serde(rename = "app.bsky.unspecced.defs#threadItemBlocked")] DefsThreadItemBlocked(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds.rs index c4606ff..1c78ff6 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedFeedsParams { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedFeedsOutput<'a> { #[serde(borrow)] pub feeds: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds_skeleton.rs index c834805..b69731e 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_feeds_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedFeedsSkeletonParams<'a> { @@ -7,10 +12,11 @@ pub struct GetSuggestedFeedsSkeletonParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedFeedsSkeletonOutput<'a> { #[serde(borrow)] pub feeds: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs.rs index 819867b..19f0153 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedStarterPacksParams { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedStarterPacksOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs_skeleton.rs index 1c6a222..e8cae3d 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_starter_packs_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedStarterPacksSkeletonParams<'a> { @@ -7,10 +12,11 @@ pub struct GetSuggestedStarterPacksSkeletonParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedStarterPacksSkeletonOutput<'a> { #[serde(borrow)] pub starter_packs: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users.rs index c5a497b..0750aef 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedUsersParams<'a> { @@ -7,10 +12,11 @@ pub struct GetSuggestedUsersParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedUsersOutput<'a> { #[serde(borrow)] pub actors: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users_skeleton.rs index b6184a2..d25223f 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggested_users_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedUsersSkeletonParams<'a> { @@ -10,10 +15,11 @@ pub struct GetSuggestedUsersSkeletonParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestedUsersSkeletonOutput<'a> { #[serde(borrow)] pub dids: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_suggestions_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_suggestions_skeleton.rs index 01e852c..dbfa87c 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_suggestions_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_suggestions_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSuggestionsSkeletonParams<'a> { @@ -13,6 +18,7 @@ pub struct GetSuggestionsSkeletonParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,9 +28,11 @@ pub struct GetSuggestionsSkeletonOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, + ///Snowflake for this recommendation, use when submitting recommendation events. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub rec_id: std::option::Option, + ///DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub relative_to_did: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs index f5a8eb1..cb7656a 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetTaggedSuggestionsParams {} @@ -8,6 +13,7 @@ pub struct GetTaggedSuggestionsOutput<'a> { #[serde(borrow)] pub suggestions: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,4 +24,4 @@ pub struct Suggestion<'a> { pub subject_type: jacquard_common::CowStr<'a>, #[serde(borrow)] pub tag: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_trending_topics.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_trending_topics.rs index 757c0e9..eb145dc 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_trending_topics.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_trending_topics.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetTrendingTopicsParams<'a> { @@ -7,6 +12,7 @@ pub struct GetTrendingTopicsParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -15,4 +21,4 @@ pub struct GetTrendingTopicsOutput<'a> { pub suggested: Vec>, #[serde(borrow)] pub topics: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_trends.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_trends.rs index 14d1717..f21cade 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_trends.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_trends.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetTrendsParams { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetTrendsOutput<'a> { #[serde(borrow)] pub trends: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_trends_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_trends_skeleton.rs index 9e5a1a5..f724ce4 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_trends_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_trends_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetTrendsSkeletonParams<'a> { @@ -7,10 +12,11 @@ pub struct GetTrendsSkeletonParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetTrendsSkeletonOutput<'a> { #[serde(borrow)] pub trends: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/init_age_assurance.rs b/crates/jacquard-api/src/app_bsky/unspecced/init_age_assurance.rs index 93f264f..1b655c0 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/init_age_assurance.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/init_age_assurance.rs @@ -1,14 +1,23 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct InitAgeAssuranceInput<'a> { + ///An ISO 3166-1 alpha-2 code of the user's location. #[serde(borrow)] pub country_code: jacquard_common::CowStr<'a>, + ///The user's email address to receive assurance instructions. #[serde(borrow)] pub email: jacquard_common::CowStr<'a>, + ///The user's preferred language for communication during the assurance process. #[serde(borrow)] pub language: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -17,6 +26,7 @@ pub struct InitAgeAssuranceOutput<'a> { #[serde(borrow)] pub value: crate::app_bsky::unspecced::AgeAssuranceState<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -38,6 +48,7 @@ pub enum InitAgeAssuranceError<'a> { #[serde(rename = "InvalidInitiation")] InvalidInitiation(std::option::Option), } + impl std::fmt::Display for InitAgeAssuranceError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -62,7 +73,7 @@ impl std::fmt::Display for InitAgeAssuranceError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/search_actors_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/search_actors_skeleton.rs index 123b5da..f456f4c 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/search_actors_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/search_actors_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchActorsSkeletonParams<'a> { @@ -14,6 +19,7 @@ pub struct SearchActorsSkeletonParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -23,9 +29,11 @@ pub struct SearchActorsSkeletonOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, + ///Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hits_total: std::option::Option, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -43,6 +51,7 @@ pub enum SearchActorsSkeletonError<'a> { #[serde(rename = "BadQueryString")] BadQueryString(std::option::Option), } + impl std::fmt::Display for SearchActorsSkeletonError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -53,7 +62,7 @@ impl std::fmt::Display for SearchActorsSkeletonError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/search_posts_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/search_posts_skeleton.rs index 0575b22..0dd4e1b 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/search_posts_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/search_posts_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchPostsSkeletonParams<'a> { @@ -38,6 +43,7 @@ pub struct SearchPostsSkeletonParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -45,11 +51,13 @@ pub struct SearchPostsSkeletonOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, + ///Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hits_total: std::option::Option, #[serde(borrow)] pub posts: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -67,6 +75,7 @@ pub enum SearchPostsSkeletonError<'a> { #[serde(rename = "BadQueryString")] BadQueryString(std::option::Option), } + impl std::fmt::Display for SearchPostsSkeletonError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -77,7 +86,7 @@ impl std::fmt::Display for SearchPostsSkeletonError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/unspecced/search_starter_packs_skeleton.rs b/crates/jacquard-api/src/app_bsky/unspecced/search_starter_packs_skeleton.rs index 6c5eb1d..be847d2 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/search_starter_packs_skeleton.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/search_starter_packs_skeleton.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchStarterPacksSkeletonParams<'a> { @@ -12,6 +17,7 @@ pub struct SearchStarterPacksSkeletonParams<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,11 +25,13 @@ pub struct SearchStarterPacksSkeletonOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, + ///Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hits_total: std::option::Option, #[serde(borrow)] pub starter_packs: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -41,6 +49,7 @@ pub enum SearchStarterPacksSkeletonError<'a> { #[serde(rename = "BadQueryString")] BadQueryString(std::option::Option), } + impl std::fmt::Display for SearchStarterPacksSkeletonError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -51,7 +60,7 @@ impl std::fmt::Display for SearchStarterPacksSkeletonError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/video.rs b/crates/jacquard-api/src/app_bsky/video.rs index 34aa8f8..cbb5ee6 100644 --- a/crates/jacquard-api/src/app_bsky/video.rs +++ b/crates/jacquard-api/src/app_bsky/video.rs @@ -1,3 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_job_status; +pub mod get_upload_limits; +pub mod upload_video; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -15,11 +24,10 @@ pub struct JobStatus<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub message: std::option::Option>, + ///Progress within the current processing state. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub progress: std::option::Option, + ///The state of the video processing job. All values not listed as a known value indicate that the job is in process. #[serde(borrow)] pub state: jacquard_common::CowStr<'a>, -} -pub mod get_job_status; -pub mod get_upload_limits; -pub mod upload_video; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/video/get_job_status.rs b/crates/jacquard-api/src/app_bsky/video/get_job_status.rs index 06c0de5..e5e5098 100644 --- a/crates/jacquard-api/src/app_bsky/video/get_job_status.rs +++ b/crates/jacquard-api/src/app_bsky/video/get_job_status.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetJobStatusParams<'a> { #[serde(borrow)] pub job_id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetJobStatusOutput<'a> { #[serde(borrow)] pub job_status: crate::app_bsky::video::JobStatus<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/video/get_upload_limits.rs b/crates/jacquard-api/src/app_bsky/video/get_upload_limits.rs index 00851b4..6b6196b 100644 --- a/crates/jacquard-api/src/app_bsky/video/get_upload_limits.rs +++ b/crates/jacquard-api/src/app_bsky/video/get_upload_limits.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -13,4 +18,4 @@ pub struct GetUploadLimitsOutput<'a> { pub remaining_daily_bytes: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub remaining_daily_videos: std::option::Option, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_bsky/video/upload_video.rs b/crates/jacquard-api/src/app_bsky/video/upload_video.rs index 0152470..54542e6 100644 --- a/crates/jacquard-api/src/app_bsky/video/upload_video.rs +++ b/crates/jacquard-api/src/app_bsky/video/upload_video.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,4 +13,4 @@ pub struct UploadVideoInput<'a> {} pub struct UploadVideoOutput<'a> { #[serde(borrow)] pub job_status: crate::app_bsky::video::JobStatus<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky.rs b/crates/jacquard-api/src/chat_bsky.rs index 76d51d7..a47a07d 100644 --- a/crates/jacquard-api/src/chat_bsky.rs +++ b/crates/jacquard-api/src/chat_bsky.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + pub mod actor; pub mod convo; -pub mod moderation; +pub mod moderation; \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/actor.rs b/crates/jacquard-api/src/chat_bsky/actor.rs index 6b952b7..791d664 100644 --- a/crates/jacquard-api/src/chat_bsky/actor.rs +++ b/crates/jacquard-api/src/chat_bsky/actor.rs @@ -1,3 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod declaration; +pub mod delete_account; +pub mod export_account_data; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,6 +17,7 @@ pub struct ProfileViewBasic<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, + ///Set to true when the actor cannot actively participate in conversations #[serde(skip_serializing_if = "std::option::Option::is_none")] pub chat_disabled: std::option::Option, #[serde(borrow)] @@ -26,7 +36,4 @@ pub struct ProfileViewBasic<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, -} -pub mod declaration; -pub mod delete_account; -pub mod export_account_data; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/actor/declaration.rs b/crates/jacquard-api/src/chat_bsky/actor/declaration.rs index e8ed78b..6bafe9d 100644 --- a/crates/jacquard-api/src/chat_bsky/actor/declaration.rs +++ b/crates/jacquard-api/src/chat_bsky/actor/declaration.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///A declaration of a Bluesky chat account. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -5,4 +10,4 @@ pub struct Declaration<'a> { #[serde(borrow)] pub allow_incoming: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/actor/delete_account.rs b/crates/jacquard-api/src/chat_bsky/actor/delete_account.rs index ec4df22..9281167 100644 --- a/crates/jacquard-api/src/chat_bsky/actor/delete_account.rs +++ b/crates/jacquard-api/src/chat_bsky/actor/delete_account.rs @@ -1,4 +1,9 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct DeleteAccountOutput<'a> {} +pub struct DeleteAccountOutput<'a> {} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/actor/export_account_data.rs b/crates/jacquard-api/src/chat_bsky/actor/export_account_data.rs index 20acfe6..684bc81 100644 --- a/crates/jacquard-api/src/chat_bsky/actor/export_account_data.rs +++ b/crates/jacquard-api/src/chat_bsky/actor/export_account_data.rs @@ -1,4 +1,9 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ExportAccountDataOutput<'a> {} +pub struct ExportAccountDataOutput<'a> {} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo.rs b/crates/jacquard-api/src/chat_bsky/convo.rs index ab73f44..9d247b6 100644 --- a/crates/jacquard-api/src/chat_bsky/convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo.rs @@ -1,3 +1,26 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod accept_convo; +pub mod add_reaction; +pub mod delete_message_for_self; +pub mod get_convo; +pub mod get_convo_availability; +pub mod get_convo_for_members; +pub mod get_log; +pub mod get_messages; +pub mod leave_convo; +pub mod list_convos; +pub mod mute_convo; +pub mod remove_reaction; +pub mod send_message; +pub mod send_message_batch; +pub mod unmute_convo; +pub mod update_all_read; +pub mod update_read; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -20,6 +43,7 @@ pub struct ConvoView<'a> { pub status: std::option::Option>, pub unread_count: i64, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -39,9 +63,10 @@ pub struct DeletedMessageView<'a> { #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, #[serde(borrow)] - pub sender: jacquard_common::types::value::Data<'a>, + pub sender: crate::chat_bsky::convo::MessageViewSender<'a>, pub sent_at: jacquard_common::types::string::Datetime, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -51,6 +76,7 @@ pub struct LogAcceptConvo<'a> { #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -60,10 +86,11 @@ pub struct LogAddReaction<'a> { #[serde(borrow)] pub message: LogAddReactionRecordMessage<'a>, #[serde(borrow)] - pub reaction: jacquard_common::types::value::Data<'a>, + pub reaction: crate::chat_bsky::convo::ReactionView<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -78,6 +105,7 @@ pub struct LogBeginConvo<'a> { #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -89,6 +117,7 @@ pub struct LogCreateMessage<'a> { #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -105,6 +134,7 @@ pub struct LogDeleteMessage<'a> { #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -119,6 +149,7 @@ pub struct LogLeaveConvo<'a> { #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -128,6 +159,7 @@ pub struct LogMuteConvo<'a> { #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -139,6 +171,7 @@ pub struct LogReadMessage<'a> { #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -153,10 +186,11 @@ pub struct LogRemoveReaction<'a> { #[serde(borrow)] pub message: LogRemoveReactionRecordMessage<'a>, #[serde(borrow)] - pub reaction: jacquard_common::types::value::Data<'a>, + pub reaction: crate::chat_bsky::convo::ReactionView<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -171,15 +205,17 @@ pub struct LogUnmuteConvo<'a> { #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MessageAndReactionView<'a> { #[serde(borrow)] - pub message: jacquard_common::types::value::Data<'a>, + pub message: crate::chat_bsky::convo::MessageView<'a>, #[serde(borrow)] - pub reaction: jacquard_common::types::value::Data<'a>, + pub reaction: crate::chat_bsky::convo::ReactionView<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -187,12 +223,14 @@ pub struct MessageInput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embed: std::option::Option>, + ///Annotations of text (mentions, URLs, hashtags, etc) #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub facets: std::option::Option>>, #[serde(borrow)] pub text: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -201,6 +239,7 @@ pub enum MessageInputRecordEmbed<'a> { #[serde(rename = "app.bsky.embed.record")] Record(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -212,6 +251,7 @@ pub struct MessageRef<'a> { #[serde(borrow)] pub message_id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -219,22 +259,25 @@ pub struct MessageView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embed: std::option::Option>, + ///Annotations of text (mentions, URLs, hashtags, etc) #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub facets: std::option::Option>>, #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, + ///Reactions to this message, in ascending order of creation time. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub reactions: std::option::Option>>, + pub reactions: std::option::Option>>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, #[serde(borrow)] - pub sender: jacquard_common::types::value::Data<'a>, + pub sender: crate::chat_bsky::convo::MessageViewSender<'a>, pub sent_at: jacquard_common::types::string::Datetime, #[serde(borrow)] pub text: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -243,6 +286,7 @@ pub enum MessageViewRecordEmbed<'a> { #[serde(rename = "app.bsky.embed.record#view")] RecordView(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -250,37 +294,22 @@ pub struct MessageViewSender<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ReactionView<'a> { pub created_at: jacquard_common::types::string::Datetime, #[serde(borrow)] - pub sender: jacquard_common::types::value::Data<'a>, + pub sender: crate::chat_bsky::convo::ReactionViewSender<'a>, #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ReactionViewSender<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, -} -pub mod accept_convo; -pub mod add_reaction; -pub mod delete_message_for_self; -pub mod get_convo; -pub mod get_convo_availability; -pub mod get_convo_for_members; -pub mod get_log; -pub mod get_messages; -pub mod leave_convo; -pub mod list_convos; -pub mod mute_convo; -pub mod remove_reaction; -pub mod send_message; -pub mod send_message_batch; -pub mod unmute_convo; -pub mod update_all_read; -pub mod update_read; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/accept_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/accept_convo.rs index 8879efc..aec1e18 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/accept_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/accept_convo.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,11 +10,13 @@ pub struct AcceptConvoInput<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AcceptConvoOutput<'a> { + ///Rev when the convo was accepted. If not present, the convo was already accepted. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub rev: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/add_reaction.rs b/crates/jacquard-api/src/chat_bsky/convo/add_reaction.rs index 1d9df70..4224533 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/add_reaction.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/add_reaction.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -9,6 +14,7 @@ pub struct AddReactionInput<'a> { #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,6 +22,7 @@ pub struct AddReactionOutput<'a> { #[serde(borrow)] pub message: crate::chat_bsky::convo::MessageView<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -40,6 +47,7 @@ pub enum AddReactionError<'a> { #[serde(rename = "ReactionInvalidValue")] ReactionInvalidValue(std::option::Option), } + impl std::fmt::Display for AddReactionError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -64,7 +72,7 @@ impl std::fmt::Display for AddReactionError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/delete_message_for_self.rs b/crates/jacquard-api/src/chat_bsky/convo/delete_message_for_self.rs index 61704a2..25ddc5b 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/delete_message_for_self.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/delete_message_for_self.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct DeleteMessageForSelfInput<'a> { #[serde(borrow)] pub message_id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -14,4 +20,4 @@ pub struct DeleteMessageForSelfOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::chat_bsky::convo::DeletedMessageView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/get_convo.rs index a5fba4b..2ecbdbe 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_convo.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetConvoParams<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetConvoOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_convo_availability.rs b/crates/jacquard-api/src/chat_bsky/convo/get_convo_availability.rs index 0006b74..b865ede 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_convo_availability.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_convo_availability.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetConvoAvailabilityParams<'a> { #[serde(borrow)] pub members: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -12,4 +18,4 @@ pub struct GetConvoAvailabilityOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub convo: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_convo_for_members.rs b/crates/jacquard-api/src/chat_bsky/convo/get_convo_for_members.rs index f7a7871..942ecc1 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_convo_for_members.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_convo_for_members.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetConvoForMembersParams<'a> { #[serde(borrow)] pub members: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetConvoForMembersOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_log.rs b/crates/jacquard-api/src/chat_bsky/convo/get_log.rs index 61ff0d2..e0061c0 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_log.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_log.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetLogParams<'a> { @@ -5,6 +10,7 @@ pub struct GetLogParams<'a> { #[serde(borrow)] pub cursor: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -14,4 +20,4 @@ pub struct GetLogOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub logs: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/get_messages.rs b/crates/jacquard-api/src/chat_bsky/convo/get_messages.rs index e6319a0..2e61aba 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/get_messages.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/get_messages.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetMessagesParams<'a> { @@ -9,6 +14,7 @@ pub struct GetMessagesParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,4 +24,4 @@ pub struct GetMessagesOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub messages: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/leave_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/leave_convo.rs index fdc3095..9466cee 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/leave_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/leave_convo.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,6 +10,7 @@ pub struct LeaveConvoInput<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -13,4 +19,4 @@ pub struct LeaveConvoOutput<'a> { pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/list_convos.rs b/crates/jacquard-api/src/chat_bsky/convo/list_convos.rs index a9ace2f..fcba2ee 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/list_convos.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/list_convos.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListConvosParams<'a> { @@ -13,6 +18,7 @@ pub struct ListConvosParams<'a> { #[serde(borrow)] pub status: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +28,4 @@ pub struct ListConvosOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/mute_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/mute_convo.rs index 63cedef..5f5a17d 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/mute_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/mute_convo.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,10 +10,11 @@ pub struct MuteConvoInput<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MuteConvoOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/remove_reaction.rs b/crates/jacquard-api/src/chat_bsky/convo/remove_reaction.rs index acff6f7..7675c9d 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/remove_reaction.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/remove_reaction.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -9,6 +14,7 @@ pub struct RemoveReactionInput<'a> { #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,6 +22,7 @@ pub struct RemoveReactionOutput<'a> { #[serde(borrow)] pub message: crate::chat_bsky::convo::MessageView<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -37,6 +44,7 @@ pub enum RemoveReactionError<'a> { #[serde(rename = "ReactionInvalidValue")] ReactionInvalidValue(std::option::Option), } + impl std::fmt::Display for RemoveReactionError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -54,7 +62,7 @@ impl std::fmt::Display for RemoveReactionError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/send_message.rs b/crates/jacquard-api/src/chat_bsky/convo/send_message.rs index b033d5f..8963cc0 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/send_message.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/send_message.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct SendMessageInput<'a> { #[serde(borrow)] pub message: crate::chat_bsky::convo::MessageInput<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -14,4 +20,4 @@ pub struct SendMessageOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::chat_bsky::convo::MessageView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs b/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs index b2659cd..ffdf8e5 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct BatchItem<'a> { #[serde(borrow)] pub message: crate::chat_bsky::convo::MessageInput<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -14,10 +20,11 @@ pub struct SendMessageBatchInput<'a> { #[serde(borrow)] pub items: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SendMessageBatchOutput<'a> { #[serde(borrow)] pub items: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/unmute_convo.rs b/crates/jacquard-api/src/chat_bsky/convo/unmute_convo.rs index e779ea3..4d35e9a 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/unmute_convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/unmute_convo.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,10 +10,11 @@ pub struct UnmuteConvoInput<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UnmuteConvoOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/update_all_read.rs b/crates/jacquard-api/src/chat_bsky/convo/update_all_read.rs index a304a4b..6816b2b 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/update_all_read.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/update_all_read.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,9 +11,11 @@ pub struct UpdateAllReadInput<'a> { #[serde(borrow)] pub status: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpdateAllReadOutput<'a> { + ///The count of updated convos. pub updated_count: i64, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/convo/update_read.rs b/crates/jacquard-api/src/chat_bsky/convo/update_read.rs index d48573b..d5f12b5 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/update_read.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/update_read.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,10 +13,11 @@ pub struct UpdateReadInput<'a> { #[serde(borrow)] pub message_id: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpdateReadOutput<'a> { #[serde(borrow)] pub convo: crate::chat_bsky::convo::ConvoView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/moderation.rs b/crates/jacquard-api/src/chat_bsky/moderation.rs index 0b7d0e2..6b847c8 100644 --- a/crates/jacquard-api/src/chat_bsky/moderation.rs +++ b/crates/jacquard-api/src/chat_bsky/moderation.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + pub mod get_actor_metadata; pub mod get_message_context; -pub mod update_actor_access; +pub mod update_actor_access; \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs b/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs index bb47a2f..1378285 100644 --- a/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs +++ b/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetActorMetadataParams<'a> { #[serde(borrow)] pub actor: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -15,6 +21,7 @@ pub struct GetActorMetadataOutput<'a> { #[serde(borrow)] pub month: jacquard_common::types::value::Data<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -23,4 +30,4 @@ pub struct Metadata<'a> { pub convos_started: i64, pub messages_received: i64, pub messages_sent: i64, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/moderation/get_message_context.rs b/crates/jacquard-api/src/chat_bsky/moderation/get_message_context.rs index b311cf5..52b9eda 100644 --- a/crates/jacquard-api/src/chat_bsky/moderation/get_message_context.rs +++ b/crates/jacquard-api/src/chat_bsky/moderation/get_message_context.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetMessageContextParams<'a> { @@ -11,10 +16,11 @@ pub struct GetMessageContextParams<'a> { #[serde(borrow)] pub message_id: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetMessageContextOutput<'a> { #[serde(borrow)] pub messages: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/chat_bsky/moderation/update_actor_access.rs b/crates/jacquard-api/src/chat_bsky/moderation/update_actor_access.rs index 7730771..9337b19 100644 --- a/crates/jacquard-api/src/chat_bsky/moderation/update_actor_access.rs +++ b/crates/jacquard-api/src/chat_bsky/moderation/update_actor_access.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,4 +13,4 @@ pub struct UpdateActorAccessInput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub r#ref: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto.rs b/crates/jacquard-api/src/com_atproto.rs index 067cd96..871babe 100644 --- a/crates/jacquard-api/src/com_atproto.rs +++ b/crates/jacquard-api/src/com_atproto.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + pub mod admin; pub mod identity; pub mod label; @@ -6,4 +11,4 @@ pub mod moderation; pub mod repo; pub mod server; pub mod sync; -pub mod temp; +pub mod temp; \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin.rs b/crates/jacquard-api/src/com_atproto/admin.rs index 62284f1..c9fe0a3 100644 --- a/crates/jacquard-api/src/com_atproto/admin.rs +++ b/crates/jacquard-api/src/com_atproto/admin.rs @@ -1,3 +1,24 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod delete_account; +pub mod disable_account_invites; +pub mod disable_invite_codes; +pub mod enable_account_invites; +pub mod get_account_info; +pub mod get_account_infos; +pub mod get_invite_codes; +pub mod get_subject_status; +pub mod search_accounts; +pub mod send_email; +pub mod update_account_email; +pub mod update_account_handle; +pub mod update_account_password; +pub mod update_account_signing_key; +pub mod update_subject_status; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -35,9 +56,10 @@ pub struct AccountView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub threat_signatures: std::option::Option< - Vec>, + Vec>, >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -50,6 +72,7 @@ pub struct RepoBlobRef<'a> { #[serde(borrow)] pub record_uri: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -57,6 +80,7 @@ pub struct RepoRef<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -66,6 +90,7 @@ pub struct StatusAttr<'a> { #[serde(borrow)] pub r#ref: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -74,19 +99,4 @@ pub struct ThreatSignature<'a> { pub property: jacquard_common::CowStr<'a>, #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, -} -pub mod delete_account; -pub mod disable_account_invites; -pub mod disable_invite_codes; -pub mod enable_account_invites; -pub mod get_account_info; -pub mod get_account_infos; -pub mod get_invite_codes; -pub mod get_subject_status; -pub mod search_accounts; -pub mod send_email; -pub mod update_account_email; -pub mod update_account_handle; -pub mod update_account_password; -pub mod update_account_signing_key; -pub mod update_subject_status; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/delete_account.rs b/crates/jacquard-api/src/com_atproto/admin/delete_account.rs index 945ffea..e8374a5 100644 --- a/crates/jacquard-api/src/com_atproto/admin/delete_account.rs +++ b/crates/jacquard-api/src/com_atproto/admin/delete_account.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DeleteAccountInput<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/disable_account_invites.rs b/crates/jacquard-api/src/com_atproto/admin/disable_account_invites.rs index 3873c3f..74a1bfc 100644 --- a/crates/jacquard-api/src/com_atproto/admin/disable_account_invites.rs +++ b/crates/jacquard-api/src/com_atproto/admin/disable_account_invites.rs @@ -1,10 +1,16 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DisableAccountInvitesInput<'a> { #[serde(borrow)] pub account: jacquard_common::types::string::Did<'a>, + ///Optional reason for disabled invites. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub note: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/disable_invite_codes.rs b/crates/jacquard-api/src/com_atproto/admin/disable_invite_codes.rs index baac940..3f33aab 100644 --- a/crates/jacquard-api/src/com_atproto/admin/disable_invite_codes.rs +++ b/crates/jacquard-api/src/com_atproto/admin/disable_invite_codes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,4 +13,4 @@ pub struct DisableInviteCodesInput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub codes: std::option::Option>>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/enable_account_invites.rs b/crates/jacquard-api/src/com_atproto/admin/enable_account_invites.rs index ca2ed21..8036c14 100644 --- a/crates/jacquard-api/src/com_atproto/admin/enable_account_invites.rs +++ b/crates/jacquard-api/src/com_atproto/admin/enable_account_invites.rs @@ -1,10 +1,16 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct EnableAccountInvitesInput<'a> { #[serde(borrow)] pub account: jacquard_common::types::string::Did<'a>, + ///Optional reason for enabled invites. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub note: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/get_account_info.rs b/crates/jacquard-api/src/com_atproto/admin/get_account_info.rs index 9a4421d..905ae17 100644 --- a/crates/jacquard-api/src/com_atproto/admin/get_account_info.rs +++ b/crates/jacquard-api/src/com_atproto/admin/get_account_info.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetAccountInfoParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -11,4 +17,4 @@ pub struct GetAccountInfoOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::com_atproto::admin::AccountView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/get_account_infos.rs b/crates/jacquard-api/src/com_atproto/admin/get_account_infos.rs index ff6cc7b..44f8250 100644 --- a/crates/jacquard-api/src/com_atproto/admin/get_account_infos.rs +++ b/crates/jacquard-api/src/com_atproto/admin/get_account_infos.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetAccountInfosParams<'a> { #[serde(borrow)] pub dids: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetAccountInfosOutput<'a> { #[serde(borrow)] pub infos: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/get_invite_codes.rs b/crates/jacquard-api/src/com_atproto/admin/get_invite_codes.rs index f5ece75..7938edc 100644 --- a/crates/jacquard-api/src/com_atproto/admin/get_invite_codes.rs +++ b/crates/jacquard-api/src/com_atproto/admin/get_invite_codes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetInviteCodesParams<'a> { @@ -10,6 +15,7 @@ pub struct GetInviteCodesParams<'a> { #[serde(borrow)] pub sort: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,4 +25,4 @@ pub struct GetInviteCodesOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/get_subject_status.rs b/crates/jacquard-api/src/com_atproto/admin/get_subject_status.rs index 3f2dead..881fb35 100644 --- a/crates/jacquard-api/src/com_atproto/admin/get_subject_status.rs +++ b/crates/jacquard-api/src/com_atproto/admin/get_subject_status.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSubjectStatusParams<'a> { @@ -11,6 +16,7 @@ pub struct GetSubjectStatusParams<'a> { #[serde(borrow)] pub uri: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,6 +30,7 @@ pub struct GetSubjectStatusOutput<'a> { #[serde(borrow)] pub takedown: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -35,4 +42,4 @@ pub enum GetSubjectStatusOutputRecordSubject<'a> { StrongRef(Box>), #[serde(rename = "com.atproto.admin.defs#repoBlobRef")] DefsRepoBlobRef(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/search_accounts.rs b/crates/jacquard-api/src/com_atproto/admin/search_accounts.rs index 2f9c57c..5f32559 100644 --- a/crates/jacquard-api/src/com_atproto/admin/search_accounts.rs +++ b/crates/jacquard-api/src/com_atproto/admin/search_accounts.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchAccountsParams<'a> { @@ -10,6 +15,7 @@ pub struct SearchAccountsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,4 +25,4 @@ pub struct SearchAccountsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/send_email.rs b/crates/jacquard-api/src/com_atproto/admin/send_email.rs index 5c906f0..e981c86 100644 --- a/crates/jacquard-api/src/com_atproto/admin/send_email.rs +++ b/crates/jacquard-api/src/com_atproto/admin/send_email.rs @@ -1,7 +1,13 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SendEmailInput<'a> { + ///Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, @@ -15,9 +21,10 @@ pub struct SendEmailInput<'a> { #[serde(borrow)] pub subject: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SendEmailOutput<'a> { pub sent: bool, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs index 602bc0f..5fd01ee 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpdateAccountEmailInput<'a> { + ///The handle or DID of the repo. #[serde(borrow)] pub account: jacquard_common::types::ident::AtIdentifier<'a>, #[serde(borrow)] pub email: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs index 8750283..8068f6e 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,4 +11,4 @@ pub struct UpdateAccountHandleInput<'a> { pub did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_password.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_password.rs index a2c6cad..2aa05d0 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_password.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_password.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,4 +11,4 @@ pub struct UpdateAccountPasswordInput<'a> { pub did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub password: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs index 89a4a60..b17d5a6 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpdateAccountSigningKeyInput<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///Did-key formatted public key #[serde(borrow)] pub signing_key: jacquard_common::types::string::Did<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/admin/update_subject_status.rs b/crates/jacquard-api/src/com_atproto/admin/update_subject_status.rs index 54fece6..9a74e4c 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_subject_status.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_subject_status.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -11,6 +16,7 @@ pub struct UpdateSubjectStatusInput<'a> { #[serde(borrow)] pub takedown: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -23,6 +29,7 @@ pub enum UpdateSubjectStatusInputRecordSubject<'a> { #[serde(rename = "com.atproto.admin.defs#repoBlobRef")] DefsRepoBlobRef(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -33,6 +40,7 @@ pub struct UpdateSubjectStatusOutput<'a> { #[serde(borrow)] pub takedown: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -44,4 +52,4 @@ pub enum UpdateSubjectStatusOutputRecordSubject<'a> { StrongRef(Box>), #[serde(rename = "com.atproto.admin.defs#repoBlobRef")] DefsRepoBlobRef(Box>), -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity.rs b/crates/jacquard-api/src/com_atproto/identity.rs index 84c1157..f7f73ad 100644 --- a/crates/jacquard-api/src/com_atproto/identity.rs +++ b/crates/jacquard-api/src/com_atproto/identity.rs @@ -1,20 +1,28 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_recommended_did_credentials; +pub mod refresh_identity; +pub mod request_plc_operation_signature; +pub mod resolve_did; +pub mod resolve_handle; +pub mod resolve_identity; +pub mod sign_plc_operation; +pub mod submit_plc_operation; +pub mod update_handle; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct IdentityInfo<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///The complete DID document for the identity. #[serde(borrow)] pub did_doc: jacquard_common::types::value::Data<'a>, + ///The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, -} -pub mod get_recommended_did_credentials; -pub mod refresh_identity; -pub mod request_plc_operation_signature; -pub mod resolve_did; -pub mod resolve_handle; -pub mod resolve_identity; -pub mod sign_plc_operation; -pub mod submit_plc_operation; -pub mod update_handle; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/get_recommended_did_credentials.rs b/crates/jacquard-api/src/com_atproto/identity/get_recommended_did_credentials.rs index 8442555..5f23a52 100644 --- a/crates/jacquard-api/src/com_atproto/identity/get_recommended_did_credentials.rs +++ b/crates/jacquard-api/src/com_atproto/identity/get_recommended_did_credentials.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,6 +10,7 @@ pub struct GetRecommendedDidCredentialsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub also_known_as: std::option::Option>>, + ///Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub rotation_keys: std::option::Option>>, @@ -16,4 +22,4 @@ pub struct GetRecommendedDidCredentialsOutput<'a> { pub verification_methods: std::option::Option< jacquard_common::types::value::Data<'a>, >, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/refresh_identity.rs b/crates/jacquard-api/src/com_atproto/identity/refresh_identity.rs index a2d7752..a0ab91b 100644 --- a/crates/jacquard-api/src/com_atproto/identity/refresh_identity.rs +++ b/crates/jacquard-api/src/com_atproto/identity/refresh_identity.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,6 +10,7 @@ pub struct RefreshIdentityInput<'a> { #[serde(borrow)] pub identifier: jacquard_common::types::ident::AtIdentifier<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -13,6 +19,7 @@ pub struct RefreshIdentityOutput<'a> { #[serde(borrow)] pub value: crate::com_atproto::identity::IdentityInfo<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -37,6 +44,7 @@ pub enum RefreshIdentityError<'a> { #[serde(rename = "DidDeactivated")] DidDeactivated(std::option::Option), } + impl std::fmt::Display for RefreshIdentityError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -61,7 +69,7 @@ impl std::fmt::Display for RefreshIdentityError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/request_plc_operation_signature.rs b/crates/jacquard-api/src/com_atproto/identity/request_plc_operation_signature.rs index e69de29..3ba330e 100644 --- a/crates/jacquard-api/src/com_atproto/identity/request_plc_operation_signature.rs +++ b/crates/jacquard-api/src/com_atproto/identity/request_plc_operation_signature.rs @@ -0,0 +1,5 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + diff --git a/crates/jacquard-api/src/com_atproto/identity/resolve_did.rs b/crates/jacquard-api/src/com_atproto/identity/resolve_did.rs index bdc03ec..ae61a19 100644 --- a/crates/jacquard-api/src/com_atproto/identity/resolve_did.rs +++ b/crates/jacquard-api/src/com_atproto/identity/resolve_did.rs @@ -1,16 +1,24 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ResolveDidParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ResolveDidOutput<'a> { + ///The complete DID document for the identity. #[serde(borrow)] pub did_doc: jacquard_common::types::value::Data<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -32,6 +40,7 @@ pub enum ResolveDidError<'a> { #[serde(rename = "DidDeactivated")] DidDeactivated(std::option::Option), } + impl std::fmt::Display for ResolveDidError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -49,7 +58,7 @@ impl std::fmt::Display for ResolveDidError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/resolve_handle.rs b/crates/jacquard-api/src/com_atproto/identity/resolve_handle.rs index f1371d3..f02a4ac 100644 --- a/crates/jacquard-api/src/com_atproto/identity/resolve_handle.rs +++ b/crates/jacquard-api/src/com_atproto/identity/resolve_handle.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ResolveHandleParams<'a> { #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -11,6 +17,7 @@ pub struct ResolveHandleOutput<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -29,6 +36,7 @@ pub enum ResolveHandleError<'a> { #[serde(rename = "HandleNotFound")] HandleNotFound(std::option::Option), } + impl std::fmt::Display for ResolveHandleError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -39,7 +47,7 @@ impl std::fmt::Display for ResolveHandleError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/resolve_identity.rs b/crates/jacquard-api/src/com_atproto/identity/resolve_identity.rs index becccc2..c3d3c55 100644 --- a/crates/jacquard-api/src/com_atproto/identity/resolve_identity.rs +++ b/crates/jacquard-api/src/com_atproto/identity/resolve_identity.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ResolveIdentityParams<'a> { #[serde(borrow)] pub identifier: jacquard_common::types::ident::AtIdentifier<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -12,6 +18,7 @@ pub struct ResolveIdentityOutput<'a> { #[serde(borrow)] pub value: crate::com_atproto::identity::IdentityInfo<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -36,6 +43,7 @@ pub enum ResolveIdentityError<'a> { #[serde(rename = "DidDeactivated")] DidDeactivated(std::option::Option), } + impl std::fmt::Display for ResolveIdentityError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -60,7 +68,7 @@ impl std::fmt::Display for ResolveIdentityError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/sign_plc_operation.rs b/crates/jacquard-api/src/com_atproto/identity/sign_plc_operation.rs index d0f771c..807cdc7 100644 --- a/crates/jacquard-api/src/com_atproto/identity/sign_plc_operation.rs +++ b/crates/jacquard-api/src/com_atproto/identity/sign_plc_operation.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -11,6 +16,7 @@ pub struct SignPlcOperationInput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub services: std::option::Option>, + ///A token received through com.atproto.identity.requestPlcOperationSignature #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub token: std::option::Option>, @@ -20,10 +26,12 @@ pub struct SignPlcOperationInput<'a> { jacquard_common::types::value::Data<'a>, >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SignPlcOperationOutput<'a> { + ///A signed DID PLC operation. #[serde(borrow)] pub operation: jacquard_common::types::value::Data<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/submit_plc_operation.rs b/crates/jacquard-api/src/com_atproto/identity/submit_plc_operation.rs index e602f1a..4f863b8 100644 --- a/crates/jacquard-api/src/com_atproto/identity/submit_plc_operation.rs +++ b/crates/jacquard-api/src/com_atproto/identity/submit_plc_operation.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SubmitPlcOperationInput<'a> { #[serde(borrow)] pub operation: jacquard_common::types::value::Data<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/identity/update_handle.rs b/crates/jacquard-api/src/com_atproto/identity/update_handle.rs index 9051489..fdef9a3 100644 --- a/crates/jacquard-api/src/com_atproto/identity/update_handle.rs +++ b/crates/jacquard-api/src/com_atproto/identity/update_handle.rs @@ -1,7 +1,13 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpdateHandleInput<'a> { + ///The new handle. #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/label.rs b/crates/jacquard-api/src/com_atproto/label.rs index 0ec26d8..e2bbd67 100644 --- a/crates/jacquard-api/src/com_atproto/label.rs +++ b/crates/jacquard-api/src/com_atproto/label.rs @@ -1,27 +1,45 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod query_labels; +pub mod subscribe_labels; + ///Metadata tag on an atproto resource (eg, repo or record). #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Label<'a> { + ///Optionally, CID specifying the specific version of 'uri' resource this label applies to. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, + ///Timestamp when this label was created. pub cts: jacquard_common::types::string::Datetime, + ///Timestamp at which this label expires (no longer applies). #[serde(skip_serializing_if = "std::option::Option::is_none")] pub exp: std::option::Option, + ///If true, this is a negation label, overwriting a previous label. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub neg: std::option::Option, + ///Signature of dag-cbor encoded label. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub sig: std::option::Option, + ///DID of the actor who created this label. #[serde(borrow)] pub src: jacquard_common::types::string::Did<'a>, + ///AT URI of the record, repository (account), or other resource that this label applies to. #[serde(borrow)] pub uri: jacquard_common::types::string::Uri<'a>, + ///The short string name of the value or type of this label. #[serde(borrow)] pub val: jacquard_common::CowStr<'a>, + ///The AT Protocol version of the label object. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub ver: std::option::Option, } + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum LabelValue<'a> { Hide, @@ -37,6 +55,7 @@ pub enum LabelValue<'a> { Gore, Other(jacquard_common::CowStr<'a>), } + impl<'a> LabelValue<'a> { pub fn as_str(&self) -> &str { match self { @@ -55,6 +74,7 @@ impl<'a> LabelValue<'a> { } } } + impl<'a> From<&'a str> for LabelValue<'a> { fn from(s: &'a str) -> Self { match s { @@ -73,6 +93,7 @@ impl<'a> From<&'a str> for LabelValue<'a> { } } } + impl<'a> From for LabelValue<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -91,11 +112,13 @@ impl<'a> From for LabelValue<'a> { } } } + impl<'a> AsRef for LabelValue<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for LabelValue<'a> { fn serialize(&self, serializer: S) -> Result where @@ -104,6 +127,7 @@ impl<'a> serde::Serialize for LabelValue<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for LabelValue<'a> where 'de: 'a, @@ -116,51 +140,62 @@ where Ok(Self::from(s)) } } + ///Declares a label value and its expected interpretations and behaviors. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct LabelValueDefinition<'a> { + ///Does the user need to have adult content enabled in order to configure this label? #[serde(skip_serializing_if = "std::option::Option::is_none")] pub adult_only: std::option::Option, + ///What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing. #[serde(borrow)] pub blurs: jacquard_common::CowStr<'a>, + ///The default setting for this label. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub default_setting: std::option::Option>, + ///The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). #[serde(borrow)] pub identifier: jacquard_common::CowStr<'a>, #[serde(borrow)] - pub locales: Vec>, + pub locales: Vec>, + ///How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. #[serde(borrow)] pub severity: jacquard_common::CowStr<'a>, } + ///Strings which describe the label in the UI, localized into a specific language. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct LabelValueDefinitionStrings<'a> { + ///A longer description of what the label means and why it might be applied. #[serde(borrow)] pub description: jacquard_common::CowStr<'a>, + ///The code of the language these strings are written in. pub lang: jacquard_common::types::string::Language, + ///A short human-readable name for the label. #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, } + ///Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SelfLabel<'a> { + ///The short string name of the value or type of this label. #[serde(borrow)] pub val: jacquard_common::CowStr<'a>, } + ///Metadata tags on an atproto record, published by the author within the record. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SelfLabels<'a> { #[serde(borrow)] - pub values: Vec>, -} -pub mod query_labels; -pub mod subscribe_labels; + pub values: Vec>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/label/query_labels.rs b/crates/jacquard-api/src/com_atproto/label/query_labels.rs index cf40e04..29e68c4 100644 --- a/crates/jacquard-api/src/com_atproto/label/query_labels.rs +++ b/crates/jacquard-api/src/com_atproto/label/query_labels.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct QueryLabelsParams<'a> { @@ -12,6 +17,7 @@ pub struct QueryLabelsParams<'a> { #[serde(borrow)] pub uri_patterns: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -21,4 +27,4 @@ pub struct QueryLabelsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub labels: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/label/subscribe_labels.rs b/crates/jacquard-api/src/com_atproto/label/subscribe_labels.rs index 341547c..9dfd274 100644 --- a/crates/jacquard-api/src/com_atproto/label/subscribe_labels.rs +++ b/crates/jacquard-api/src/com_atproto/label/subscribe_labels.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,6 +13,7 @@ pub struct Info<'a> { #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,12 +22,14 @@ pub struct Labels<'a> { pub labels: Vec>, pub seq: i64, } + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SubscribeLabelsParams { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub cursor: std::option::Option, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -32,6 +40,7 @@ pub enum SubscribeLabelsMessage<'a> { #[serde(rename = "#info")] Info(Box>), } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -49,6 +58,7 @@ pub enum SubscribeLabelsError<'a> { #[serde(rename = "FutureCursor")] FutureCursor(std::option::Option), } + impl std::fmt::Display for SubscribeLabelsError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -59,7 +69,7 @@ impl std::fmt::Display for SubscribeLabelsError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/lexicon.rs b/crates/jacquard-api/src/com_atproto/lexicon.rs index 1ce7e17..afe0ab6 100644 --- a/crates/jacquard-api/src/com_atproto/lexicon.rs +++ b/crates/jacquard-api/src/com_atproto/lexicon.rs @@ -1 +1,6 @@ -pub mod schema; +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod schema; \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/lexicon/schema.rs b/crates/jacquard-api/src/com_atproto/lexicon/schema.rs index 6e7fb32..39b6adc 100644 --- a/crates/jacquard-api/src/com_atproto/lexicon/schema.rs +++ b/crates/jacquard-api/src/com_atproto/lexicon/schema.rs @@ -1,7 +1,13 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc). #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Schema<'a> { + ///Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system. pub lexicon: i64, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/moderation.rs b/crates/jacquard-api/src/com_atproto/moderation.rs index fafce49..861e113 100644 --- a/crates/jacquard-api/src/com_atproto/moderation.rs +++ b/crates/jacquard-api/src/com_atproto/moderation.rs @@ -1,3 +1,10 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod create_report; + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ReasonType<'a> { ComAtprotoModerationDefsReasonSpam, @@ -54,6 +61,7 @@ pub enum ReasonType<'a> { ToolsOzoneReportDefsReasonCivicImpersonation, Other(jacquard_common::CowStr<'a>), } + impl<'a> ReasonType<'a> { pub fn as_str(&self) -> &str { match self { @@ -217,6 +225,7 @@ impl<'a> ReasonType<'a> { } } } + impl<'a> From<&'a str> for ReasonType<'a> { fn from(s: &'a str) -> Self { match s { @@ -380,6 +389,7 @@ impl<'a> From<&'a str> for ReasonType<'a> { } } } + impl<'a> From for ReasonType<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -543,11 +553,13 @@ impl<'a> From for ReasonType<'a> { } } } + impl<'a> AsRef for ReasonType<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for ReasonType<'a> { fn serialize(&self, serializer: S) -> Result where @@ -556,6 +568,7 @@ impl<'a> serde::Serialize for ReasonType<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for ReasonType<'a> where 'de: 'a, @@ -568,6 +581,7 @@ where Ok(Self::from(s)) } } + ///Tag describing a type of subject that might be reported. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum SubjectType<'a> { @@ -576,6 +590,7 @@ pub enum SubjectType<'a> { Chat, Other(jacquard_common::CowStr<'a>), } + impl<'a> SubjectType<'a> { pub fn as_str(&self) -> &str { match self { @@ -586,6 +601,7 @@ impl<'a> SubjectType<'a> { } } } + impl<'a> From<&'a str> for SubjectType<'a> { fn from(s: &'a str) -> Self { match s { @@ -596,6 +612,7 @@ impl<'a> From<&'a str> for SubjectType<'a> { } } } + impl<'a> From for SubjectType<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -606,11 +623,13 @@ impl<'a> From for SubjectType<'a> { } } } + impl<'a> AsRef for SubjectType<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for SubjectType<'a> { fn serialize(&self, serializer: S) -> Result where @@ -619,6 +638,7 @@ impl<'a> serde::Serialize for SubjectType<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for SubjectType<'a> where 'de: 'a, @@ -630,5 +650,4 @@ where let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } -} -pub mod create_report; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/moderation/create_report.rs b/crates/jacquard-api/src/com_atproto/moderation/create_report.rs index aa98ca1..808d351 100644 --- a/crates/jacquard-api/src/com_atproto/moderation/create_report.rs +++ b/crates/jacquard-api/src/com_atproto/moderation/create_report.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,14 +10,17 @@ pub struct CreateReportInput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub mod_tool: std::option::Option>, + ///Additional context about the content and violation. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub reason: std::option::Option>, + ///Indicates the broad category of violation the report is for. #[serde(borrow)] pub reason_type: crate::com_atproto::moderation::ReasonType<'a>, #[serde(borrow)] pub subject: CreateReportInputRecordSubject<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -23,6 +31,7 @@ pub enum CreateReportInputRecordSubject<'a> { #[serde(rename = "com.atproto.repo.strongRef")] StrongRef(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -39,6 +48,7 @@ pub struct CreateReportOutput<'a> { #[serde(borrow)] pub subject: CreateReportOutputRecordSubject<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -49,14 +59,17 @@ pub enum CreateReportOutputRecordSubject<'a> { #[serde(rename = "com.atproto.repo.strongRef")] StrongRef(Box>), } + ///Moderation tool information for tracing the source of the action #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModTool<'a> { + ///Additional arbitrary metadata about the source #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub meta: std::option::Option>, + ///Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome') #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo.rs b/crates/jacquard-api/src/com_atproto/repo.rs index d37857a..ee5abe5 100644 --- a/crates/jacquard-api/src/com_atproto/repo.rs +++ b/crates/jacquard-api/src/com_atproto/repo.rs @@ -1,11 +1,8 @@ -#[jacquard_derive::lexicon] -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] -#[serde(rename_all = "camelCase")] -pub struct CommitMeta<'a> { - #[serde(borrow)] - pub cid: jacquard_common::types::string::Cid<'a>, - pub rev: jacquard_common::types::string::Tid, -} +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + pub mod apply_writes; pub mod create_record; pub mod delete_record; @@ -17,3 +14,12 @@ pub mod list_records; pub mod put_record; pub mod strong_ref; pub mod upload_blob; + +#[jacquard_derive::lexicon] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct CommitMeta<'a> { + #[serde(borrow)] + pub cid: jacquard_common::types::string::Cid<'a>, + pub rev: jacquard_common::types::string::Tid, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs b/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs index d709b4d..1840328 100644 --- a/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs +++ b/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Operation which creates a new record. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -5,6 +10,7 @@ pub struct Create<'a> { #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, + ///NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub rkey: std::option::Option< @@ -15,6 +21,7 @@ pub struct Create<'a> { #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -27,6 +34,7 @@ pub struct CreateResult<'a> { #[serde(borrow)] pub validation_status: std::option::Option>, } + ///Operation which deletes an existing record. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -39,6 +47,7 @@ pub struct Delete<'a> { jacquard_common::types::string::Rkey<'a>, >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -47,16 +56,20 @@ pub struct DeleteResult<'a> {} #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ApplyWritesInput<'a> { + ///The handle or DID of the repo (aka, current account). #[serde(borrow)] pub repo: jacquard_common::types::ident::AtIdentifier<'a>, + ///If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub swap_commit: std::option::Option>, + ///Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub validate: std::option::Option, #[serde(borrow)] pub writes: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -68,6 +81,7 @@ pub struct ApplyWritesOutput<'a> { #[serde(borrow)] pub results: std::option::Option>>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -86,6 +100,7 @@ pub enum ApplyWritesError<'a> { #[serde(rename = "InvalidSwap")] InvalidSwap(std::option::Option), } + impl std::fmt::Display for ApplyWritesError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -96,10 +111,11 @@ impl std::fmt::Display for ApplyWritesError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } } + ///Operation which updates an existing record. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -114,6 +130,7 @@ pub struct Update<'a> { #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -125,4 +142,4 @@ pub struct UpdateResult<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub validation_status: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/create_record.rs b/crates/jacquard-api/src/com_atproto/repo/create_record.rs index d81b34e..c86ba52 100644 --- a/crates/jacquard-api/src/com_atproto/repo/create_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/create_record.rs @@ -1,13 +1,22 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CreateRecordInput<'a> { + ///The NSID of the record collection. #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, + ///The record itself. Must contain a $type field. #[serde(borrow)] pub record: jacquard_common::types::value::Data<'a>, + ///The handle or DID of the repo (aka, current account). #[serde(borrow)] pub repo: jacquard_common::types::ident::AtIdentifier<'a>, + ///The Record Key. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub rkey: std::option::Option< @@ -15,12 +24,15 @@ pub struct CreateRecordInput<'a> { jacquard_common::types::string::Rkey<'a>, >, >, + ///Compare and swap with the previous commit by CID. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub swap_commit: std::option::Option>, + ///Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub validate: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -36,6 +48,7 @@ pub struct CreateRecordOutput<'a> { #[serde(borrow)] pub validation_status: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -54,6 +67,7 @@ pub enum CreateRecordError<'a> { #[serde(rename = "InvalidSwap")] InvalidSwap(std::option::Option), } + impl std::fmt::Display for CreateRecordError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -64,7 +78,7 @@ impl std::fmt::Display for CreateRecordError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/delete_record.rs b/crates/jacquard-api/src/com_atproto/repo/delete_record.rs index a60ab82..a65e009 100644 --- a/crates/jacquard-api/src/com_atproto/repo/delete_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/delete_record.rs @@ -1,22 +1,33 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DeleteRecordInput<'a> { + ///The NSID of the record collection. #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, + ///The handle or DID of the repo (aka, current account). #[serde(borrow)] pub repo: jacquard_common::types::ident::AtIdentifier<'a>, + ///The Record Key. #[serde(borrow)] pub rkey: jacquard_common::types::string::RecordKey< jacquard_common::types::string::Rkey<'a>, >, + ///Compare and swap with the previous commit by CID. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub swap_commit: std::option::Option>, + ///Compare and swap with the previous record by CID. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub swap_record: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,6 +36,7 @@ pub struct DeleteRecordOutput<'a> { #[serde(borrow)] pub commit: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -42,6 +54,7 @@ pub enum DeleteRecordError<'a> { #[serde(rename = "InvalidSwap")] InvalidSwap(std::option::Option), } + impl std::fmt::Display for DeleteRecordError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -52,7 +65,7 @@ impl std::fmt::Display for DeleteRecordError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/describe_repo.rs b/crates/jacquard-api/src/com_atproto/repo/describe_repo.rs index e4fab3c..06171c7 100644 --- a/crates/jacquard-api/src/com_atproto/repo/describe_repo.rs +++ b/crates/jacquard-api/src/com_atproto/repo/describe_repo.rs @@ -1,20 +1,29 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DescribeRepoParams<'a> { #[serde(borrow)] pub repo: jacquard_common::types::ident::AtIdentifier<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DescribeRepoOutput<'a> { + ///List of all the collections (NSIDs) for which this repo contains at least one record. #[serde(borrow)] pub collections: Vec>, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///The complete DID document for this account. #[serde(borrow)] pub did_doc: jacquard_common::types::value::Data<'a>, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, + ///Indicates if handle is currently valid (resolves bi-directionally) pub handle_is_correct: bool, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/get_record.rs b/crates/jacquard-api/src/com_atproto/repo/get_record.rs index 2678017..ae738f8 100644 --- a/crates/jacquard-api/src/com_atproto/repo/get_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/get_record.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRecordParams<'a> { @@ -13,6 +18,7 @@ pub struct GetRecordParams<'a> { jacquard_common::types::string::Rkey<'a>, >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,6 +31,7 @@ pub struct GetRecordOutput<'a> { #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -42,6 +49,7 @@ pub enum GetRecordError<'a> { #[serde(rename = "RecordNotFound")] RecordNotFound(std::option::Option), } + impl std::fmt::Display for GetRecordError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -52,7 +60,7 @@ impl std::fmt::Display for GetRecordError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/import_repo.rs b/crates/jacquard-api/src/com_atproto/repo/import_repo.rs index 4f1b91a..030128e 100644 --- a/crates/jacquard-api/src/com_atproto/repo/import_repo.rs +++ b/crates/jacquard-api/src/com_atproto/repo/import_repo.rs @@ -1,4 +1,9 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct ImportRepoInput<'a> {} +pub struct ImportRepoInput<'a> {} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/list_missing_blobs.rs b/crates/jacquard-api/src/com_atproto/repo/list_missing_blobs.rs index 0f68697..a8c2079 100644 --- a/crates/jacquard-api/src/com_atproto/repo/list_missing_blobs.rs +++ b/crates/jacquard-api/src/com_atproto/repo/list_missing_blobs.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListMissingBlobsParams<'a> { @@ -7,6 +12,7 @@ pub struct ListMissingBlobsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -17,6 +23,7 @@ pub struct ListMissingBlobsOutput<'a> { #[serde(borrow)] pub cursor: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,4 +32,4 @@ pub struct RecordBlob<'a> { pub cid: jacquard_common::types::string::Cid<'a>, #[serde(borrow)] pub record_uri: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/list_records.rs b/crates/jacquard-api/src/com_atproto/repo/list_records.rs index 914271b..878513f 100644 --- a/crates/jacquard-api/src/com_atproto/repo/list_records.rs +++ b/crates/jacquard-api/src/com_atproto/repo/list_records.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListRecordsParams<'a> { @@ -13,6 +18,7 @@ pub struct ListRecordsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub reverse: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -23,6 +29,7 @@ pub struct ListRecordsOutput<'a> { #[serde(borrow)] pub records: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -33,4 +40,4 @@ pub struct Record<'a> { pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/put_record.rs b/crates/jacquard-api/src/com_atproto/repo/put_record.rs index fa35544..f4c2b5e 100644 --- a/crates/jacquard-api/src/com_atproto/repo/put_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/put_record.rs @@ -1,26 +1,39 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct PutRecordInput<'a> { + ///The NSID of the record collection. #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, + ///The record to write. #[serde(borrow)] pub record: jacquard_common::types::value::Data<'a>, + ///The handle or DID of the repo (aka, current account). #[serde(borrow)] pub repo: jacquard_common::types::ident::AtIdentifier<'a>, + ///The Record Key. #[serde(borrow)] pub rkey: jacquard_common::types::string::RecordKey< jacquard_common::types::string::Rkey<'a>, >, + ///Compare and swap with the previous commit by CID. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub swap_commit: std::option::Option>, + ///Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub swap_record: std::option::Option>, + ///Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub validate: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -36,6 +49,7 @@ pub struct PutRecordOutput<'a> { #[serde(borrow)] pub validation_status: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -53,6 +67,7 @@ pub enum PutRecordError<'a> { #[serde(rename = "InvalidSwap")] InvalidSwap(std::option::Option), } + impl std::fmt::Display for PutRecordError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -63,7 +78,7 @@ impl std::fmt::Display for PutRecordError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/strong_ref.rs b/crates/jacquard-api/src/com_atproto/repo/strong_ref.rs index 6d268ae..8ff9db0 100644 --- a/crates/jacquard-api/src/com_atproto/repo/strong_ref.rs +++ b/crates/jacquard-api/src/com_atproto/repo/strong_ref.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,4 +11,4 @@ pub struct StrongRef<'a> { pub cid: jacquard_common::types::string::Cid<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/repo/upload_blob.rs b/crates/jacquard-api/src/com_atproto/repo/upload_blob.rs index 81baa30..7e12c8f 100644 --- a/crates/jacquard-api/src/com_atproto/repo/upload_blob.rs +++ b/crates/jacquard-api/src/com_atproto/repo/upload_blob.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,4 +13,4 @@ pub struct UploadBlobInput<'a> {} pub struct UploadBlobOutput<'a> { #[serde(borrow)] pub blob: jacquard_common::types::blob::Blob<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server.rs b/crates/jacquard-api/src/com_atproto/server.rs index 1e0174e..bf3a655 100644 --- a/crates/jacquard-api/src/com_atproto/server.rs +++ b/crates/jacquard-api/src/com_atproto/server.rs @@ -1,27 +1,8 @@ -#[jacquard_derive::lexicon] -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] -#[serde(rename_all = "camelCase")] -pub struct InviteCode<'a> { - pub available: i64, - #[serde(borrow)] - pub code: jacquard_common::CowStr<'a>, - pub created_at: jacquard_common::types::string::Datetime, - #[serde(borrow)] - pub created_by: jacquard_common::CowStr<'a>, - pub disabled: bool, - #[serde(borrow)] - pub for_account: jacquard_common::CowStr<'a>, - #[serde(borrow)] - pub uses: Vec>, -} -#[jacquard_derive::lexicon] -#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] -#[serde(rename_all = "camelCase")] -pub struct InviteCodeUse<'a> { - pub used_at: jacquard_common::types::string::Datetime, - #[serde(borrow)] - pub used_by: jacquard_common::types::string::Did<'a>, -} +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + pub mod activate_account; pub mod check_account_status; pub mod confirm_email; @@ -47,3 +28,29 @@ pub mod reserve_signing_key; pub mod reset_password; pub mod revoke_app_password; pub mod update_email; + +#[jacquard_derive::lexicon] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InviteCode<'a> { + pub available: i64, + #[serde(borrow)] + pub code: jacquard_common::CowStr<'a>, + pub created_at: jacquard_common::types::string::Datetime, + #[serde(borrow)] + pub created_by: jacquard_common::CowStr<'a>, + pub disabled: bool, + #[serde(borrow)] + pub for_account: jacquard_common::CowStr<'a>, + #[serde(borrow)] + pub uses: Vec>, +} + +#[jacquard_derive::lexicon] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InviteCodeUse<'a> { + pub used_at: jacquard_common::types::string::Datetime, + #[serde(borrow)] + pub used_by: jacquard_common::types::string::Did<'a>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/activate_account.rs b/crates/jacquard-api/src/com_atproto/server/activate_account.rs index e69de29..3ba330e 100644 --- a/crates/jacquard-api/src/com_atproto/server/activate_account.rs +++ b/crates/jacquard-api/src/com_atproto/server/activate_account.rs @@ -0,0 +1,5 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + diff --git a/crates/jacquard-api/src/com_atproto/server/check_account_status.rs b/crates/jacquard-api/src/com_atproto/server/check_account_status.rs index f056ff6..bcb757d 100644 --- a/crates/jacquard-api/src/com_atproto/server/check_account_status.rs +++ b/crates/jacquard-api/src/com_atproto/server/check_account_status.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -13,4 +18,4 @@ pub struct CheckAccountStatusOutput<'a> { #[serde(borrow)] pub repo_rev: jacquard_common::CowStr<'a>, pub valid_did: bool, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/confirm_email.rs b/crates/jacquard-api/src/com_atproto/server/confirm_email.rs index b6db1cd..f2c1399 100644 --- a/crates/jacquard-api/src/com_atproto/server/confirm_email.rs +++ b/crates/jacquard-api/src/com_atproto/server/confirm_email.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct ConfirmEmailInput<'a> { #[serde(borrow)] pub token: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -30,6 +36,7 @@ pub enum ConfirmEmailError<'a> { #[serde(rename = "InvalidEmail")] InvalidEmail(std::option::Option), } + impl std::fmt::Display for ConfirmEmailError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -61,7 +68,7 @@ impl std::fmt::Display for ConfirmEmailError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_account.rs b/crates/jacquard-api/src/com_atproto/server/create_account.rs index 9e35b71..f6fcfb0 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_account.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_account.rs @@ -1,24 +1,34 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CreateAccountInput<'a> { + ///Pre-existing atproto DID, being imported to a new account. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub did: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub email: std::option::Option>, + ///Requested handle for the account. #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub invite_code: std::option::Option>, + ///Initial account password. May need to meet instance-specific password strength requirements. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub password: std::option::Option>, + ///A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub plc_op: std::option::Option>, + ///DID PLC rotation key (aka, recovery key) to be included in PLC creation operation. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub recovery_key: std::option::Option>, @@ -29,14 +39,17 @@ pub struct CreateAccountInput<'a> { #[serde(borrow)] pub verification_phone: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CreateAccountOutput<'a> { #[serde(borrow)] pub access_jwt: jacquard_common::CowStr<'a>, + ///The DID of the new account. #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///Complete DID document. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub did_doc: std::option::Option>, @@ -45,6 +58,7 @@ pub struct CreateAccountOutput<'a> { #[serde(borrow)] pub refresh_jwt: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -74,6 +88,7 @@ pub enum CreateAccountError<'a> { #[serde(rename = "IncompatibleDidDoc")] IncompatibleDidDoc(std::option::Option), } + impl std::fmt::Display for CreateAccountError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -126,7 +141,7 @@ impl std::fmt::Display for CreateAccountError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_app_password.rs b/crates/jacquard-api/src/com_atproto/server/create_app_password.rs index a3781f7..b2d7ab3 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_app_password.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_app_password.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -10,15 +15,19 @@ pub struct AppPassword<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub privileged: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CreateAppPasswordInput<'a> { + ///A short name for the App Password, to help distinguish them. #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, + ///If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub privileged: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -27,6 +36,7 @@ pub struct CreateAppPasswordOutput<'a> { #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -44,6 +54,7 @@ pub enum CreateAppPasswordError<'a> { #[serde(rename = "AccountTakedown")] AccountTakedown(std::option::Option), } + impl std::fmt::Display for CreateAppPasswordError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -54,7 +65,7 @@ impl std::fmt::Display for CreateAppPasswordError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_invite_code.rs b/crates/jacquard-api/src/com_atproto/server/create_invite_code.rs index fff302a..798f3b4 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_invite_code.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_invite_code.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,10 +12,11 @@ pub struct CreateInviteCodeInput<'a> { pub for_account: std::option::Option>, pub use_count: i64, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CreateInviteCodeOutput<'a> { #[serde(borrow)] pub code: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs b/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs index 89e39f1..46ad84b 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct AccountCodes<'a> { #[serde(borrow)] pub codes: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -17,10 +23,11 @@ pub struct CreateInviteCodesInput<'a> { pub for_accounts: std::option::Option>>, pub use_count: i64, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CreateInviteCodesOutput<'a> { #[serde(borrow)] pub codes: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/create_session.rs b/crates/jacquard-api/src/com_atproto/server/create_session.rs index f4e6405..4465c5e 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_session.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_session.rs @@ -1,17 +1,25 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CreateSessionInput<'a> { + ///When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned #[serde(skip_serializing_if = "std::option::Option::is_none")] pub allow_takendown: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub auth_factor_token: std::option::Option>, + ///Handle or other identifier supported by the server for the authenticating user. #[serde(borrow)] pub identifier: jacquard_common::CowStr<'a>, #[serde(borrow)] pub password: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -36,10 +44,12 @@ pub struct CreateSessionOutput<'a> { pub handle: jacquard_common::types::string::Handle<'a>, #[serde(borrow)] pub refresh_jwt: jacquard_common::CowStr<'a>, + ///If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -59,6 +69,7 @@ pub enum CreateSessionError<'a> { #[serde(rename = "AuthFactorTokenRequired")] AuthFactorTokenRequired(std::option::Option), } + impl std::fmt::Display for CreateSessionError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -76,7 +87,7 @@ impl std::fmt::Display for CreateSessionError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/deactivate_account.rs b/crates/jacquard-api/src/com_atproto/server/deactivate_account.rs index 074777c..67bda22 100644 --- a/crates/jacquard-api/src/com_atproto/server/deactivate_account.rs +++ b/crates/jacquard-api/src/com_atproto/server/deactivate_account.rs @@ -1,7 +1,13 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DeactivateAccountInput<'a> { + ///A recommendation to server as to how long they should hold onto the deactivated account before deleting. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub delete_after: std::option::Option, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/delete_account.rs b/crates/jacquard-api/src/com_atproto/server/delete_account.rs index 61d69db..fd79f18 100644 --- a/crates/jacquard-api/src/com_atproto/server/delete_account.rs +++ b/crates/jacquard-api/src/com_atproto/server/delete_account.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -9,6 +14,7 @@ pub struct DeleteAccountInput<'a> { #[serde(borrow)] pub token: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -28,6 +34,7 @@ pub enum DeleteAccountError<'a> { #[serde(rename = "InvalidToken")] InvalidToken(std::option::Option), } + impl std::fmt::Display for DeleteAccountError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -45,7 +52,7 @@ impl std::fmt::Display for DeleteAccountError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/delete_session.rs b/crates/jacquard-api/src/com_atproto/server/delete_session.rs index e69de29..3ba330e 100644 --- a/crates/jacquard-api/src/com_atproto/server/delete_session.rs +++ b/crates/jacquard-api/src/com_atproto/server/delete_session.rs @@ -0,0 +1,5 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + diff --git a/crates/jacquard-api/src/com_atproto/server/describe_server.rs b/crates/jacquard-api/src/com_atproto/server/describe_server.rs index d2103ed..5da6b96 100644 --- a/crates/jacquard-api/src/com_atproto/server/describe_server.rs +++ b/crates/jacquard-api/src/com_atproto/server/describe_server.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,6 +11,7 @@ pub struct Contact<'a> { #[serde(borrow)] pub email: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -17,22 +23,28 @@ pub struct Links<'a> { #[serde(borrow)] pub terms_of_service: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DescribeServerOutput<'a> { + ///List of domain suffixes that can be used in account handles. #[serde(borrow)] pub available_user_domains: Vec>, + ///Contact information #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub contact: std::option::Option>, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///If true, an invite code must be supplied to create an account on this instance. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub invite_code_required: std::option::Option, + ///URLs of service policy documents. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub links: std::option::Option>, + ///If true, a phone verification token must be supplied to create an account on this instance. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub phone_verification_required: std::option::Option, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/get_account_invite_codes.rs b/crates/jacquard-api/src/com_atproto/server/get_account_invite_codes.rs index 490b135..593245c 100644 --- a/crates/jacquard-api/src/com_atproto/server/get_account_invite_codes.rs +++ b/crates/jacquard-api/src/com_atproto/server/get_account_invite_codes.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetAccountInviteCodesParams { @@ -6,6 +11,7 @@ pub struct GetAccountInviteCodesParams { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub include_used: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -13,6 +19,7 @@ pub struct GetAccountInviteCodesOutput<'a> { #[serde(borrow)] pub codes: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -30,6 +37,7 @@ pub enum GetAccountInviteCodesError<'a> { #[serde(rename = "DuplicateCreate")] DuplicateCreate(std::option::Option), } + impl std::fmt::Display for GetAccountInviteCodesError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -40,7 +48,7 @@ impl std::fmt::Display for GetAccountInviteCodesError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/get_service_auth.rs b/crates/jacquard-api/src/com_atproto/server/get_service_auth.rs index cc5cb19..b3fe329 100644 --- a/crates/jacquard-api/src/com_atproto/server/get_service_auth.rs +++ b/crates/jacquard-api/src/com_atproto/server/get_service_auth.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetServiceAuthParams<'a> { @@ -9,6 +14,7 @@ pub struct GetServiceAuthParams<'a> { #[serde(borrow)] pub lxm: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,6 +22,7 @@ pub struct GetServiceAuthOutput<'a> { #[serde(borrow)] pub token: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -34,6 +41,7 @@ pub enum GetServiceAuthError<'a> { #[serde(rename = "BadExpiration")] BadExpiration(std::option::Option), } + impl std::fmt::Display for GetServiceAuthError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -44,7 +52,7 @@ impl std::fmt::Display for GetServiceAuthError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/get_session.rs b/crates/jacquard-api/src/com_atproto/server/get_session.rs index 504d8e0..1252297 100644 --- a/crates/jacquard-api/src/com_atproto/server/get_session.rs +++ b/crates/jacquard-api/src/com_atproto/server/get_session.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,7 +23,8 @@ pub struct GetSessionOutput<'a> { pub email_confirmed: std::option::Option, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, + ///If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs b/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs index 52d3198..7be297f 100644 --- a/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs +++ b/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,6 +13,7 @@ pub struct AppPassword<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub privileged: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -15,6 +21,7 @@ pub struct ListAppPasswordsOutput<'a> { #[serde(borrow)] pub passwords: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -32,6 +39,7 @@ pub enum ListAppPasswordsError<'a> { #[serde(rename = "AccountTakedown")] AccountTakedown(std::option::Option), } + impl std::fmt::Display for ListAppPasswordsError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -42,7 +50,7 @@ impl std::fmt::Display for ListAppPasswordsError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/refresh_session.rs b/crates/jacquard-api/src/com_atproto/server/refresh_session.rs index c08b708..7a38b37 100644 --- a/crates/jacquard-api/src/com_atproto/server/refresh_session.rs +++ b/crates/jacquard-api/src/com_atproto/server/refresh_session.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -15,10 +20,12 @@ pub struct RefreshSessionOutput<'a> { pub handle: jacquard_common::types::string::Handle<'a>, #[serde(borrow)] pub refresh_jwt: jacquard_common::CowStr<'a>, + ///Hosting status of the account. If not specified, then assume 'active'. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -36,6 +43,7 @@ pub enum RefreshSessionError<'a> { #[serde(rename = "AccountTakedown")] AccountTakedown(std::option::Option), } + impl std::fmt::Display for RefreshSessionError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -46,7 +54,7 @@ impl std::fmt::Display for RefreshSessionError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/request_account_delete.rs b/crates/jacquard-api/src/com_atproto/server/request_account_delete.rs index e69de29..3ba330e 100644 --- a/crates/jacquard-api/src/com_atproto/server/request_account_delete.rs +++ b/crates/jacquard-api/src/com_atproto/server/request_account_delete.rs @@ -0,0 +1,5 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + diff --git a/crates/jacquard-api/src/com_atproto/server/request_email_confirmation.rs b/crates/jacquard-api/src/com_atproto/server/request_email_confirmation.rs index e69de29..3ba330e 100644 --- a/crates/jacquard-api/src/com_atproto/server/request_email_confirmation.rs +++ b/crates/jacquard-api/src/com_atproto/server/request_email_confirmation.rs @@ -0,0 +1,5 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + diff --git a/crates/jacquard-api/src/com_atproto/server/request_email_update.rs b/crates/jacquard-api/src/com_atproto/server/request_email_update.rs index 684c64e..95d6c5c 100644 --- a/crates/jacquard-api/src/com_atproto/server/request_email_update.rs +++ b/crates/jacquard-api/src/com_atproto/server/request_email_update.rs @@ -1,6 +1,11 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RequestEmailUpdateOutput<'a> { pub token_required: bool, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/request_password_reset.rs b/crates/jacquard-api/src/com_atproto/server/request_password_reset.rs index 68d31a4..a0888f6 100644 --- a/crates/jacquard-api/src/com_atproto/server/request_password_reset.rs +++ b/crates/jacquard-api/src/com_atproto/server/request_password_reset.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RequestPasswordResetInput<'a> { #[serde(borrow)] pub email: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/reserve_signing_key.rs b/crates/jacquard-api/src/com_atproto/server/reserve_signing_key.rs index 9fa3cf9..62e007a 100644 --- a/crates/jacquard-api/src/com_atproto/server/reserve_signing_key.rs +++ b/crates/jacquard-api/src/com_atproto/server/reserve_signing_key.rs @@ -1,15 +1,23 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ReserveSigningKeyInput<'a> { + ///The DID to reserve a key for. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub did: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ReserveSigningKeyOutput<'a> { + ///The public key for the reserved signing key, in did:key serialization. #[serde(borrow)] pub signing_key: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/reset_password.rs b/crates/jacquard-api/src/com_atproto/server/reset_password.rs index 7b38c75..e26e269 100644 --- a/crates/jacquard-api/src/com_atproto/server/reset_password.rs +++ b/crates/jacquard-api/src/com_atproto/server/reset_password.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct ResetPasswordInput<'a> { #[serde(borrow)] pub token: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -26,6 +32,7 @@ pub enum ResetPasswordError<'a> { #[serde(rename = "InvalidToken")] InvalidToken(std::option::Option), } + impl std::fmt::Display for ResetPasswordError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -43,7 +50,7 @@ impl std::fmt::Display for ResetPasswordError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/revoke_app_password.rs b/crates/jacquard-api/src/com_atproto/server/revoke_app_password.rs index 90da8af..f101936 100644 --- a/crates/jacquard-api/src/com_atproto/server/revoke_app_password.rs +++ b/crates/jacquard-api/src/com_atproto/server/revoke_app_password.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RevokeAppPasswordInput<'a> { #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/server/update_email.rs b/crates/jacquard-api/src/com_atproto/server/update_email.rs index 4560f56..565efd1 100644 --- a/crates/jacquard-api/src/com_atproto/server/update_email.rs +++ b/crates/jacquard-api/src/com_atproto/server/update_email.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,10 +11,12 @@ pub struct UpdateEmailInput<'a> { pub email: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub email_auth_factor: std::option::Option, + ///Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub token: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -31,6 +38,7 @@ pub enum UpdateEmailError<'a> { #[serde(rename = "TokenRequired")] TokenRequired(std::option::Option), } + impl std::fmt::Display for UpdateEmailError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -55,7 +63,7 @@ impl std::fmt::Display for UpdateEmailError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync.rs b/crates/jacquard-api/src/com_atproto/sync.rs index eab7be8..ac637c3 100644 --- a/crates/jacquard-api/src/com_atproto/sync.rs +++ b/crates/jacquard-api/src/com_atproto/sync.rs @@ -1,3 +1,25 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_blob; +pub mod get_blocks; +pub mod get_checkout; +pub mod get_head; +pub mod get_host_status; +pub mod get_latest_commit; +pub mod get_record; +pub mod get_repo; +pub mod get_repo_status; +pub mod list_blobs; +pub mod list_hosts; +pub mod list_repos; +pub mod list_repos_by_collection; +pub mod notify_of_update; +pub mod request_crawl; +pub mod subscribe_repos; + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum HostStatus<'a> { Active, @@ -7,6 +29,7 @@ pub enum HostStatus<'a> { Banned, Other(jacquard_common::CowStr<'a>), } + impl<'a> HostStatus<'a> { pub fn as_str(&self) -> &str { match self { @@ -19,6 +42,7 @@ impl<'a> HostStatus<'a> { } } } + impl<'a> From<&'a str> for HostStatus<'a> { fn from(s: &'a str) -> Self { match s { @@ -31,6 +55,7 @@ impl<'a> From<&'a str> for HostStatus<'a> { } } } + impl<'a> From for HostStatus<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -43,11 +68,13 @@ impl<'a> From for HostStatus<'a> { } } } + impl<'a> AsRef for HostStatus<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for HostStatus<'a> { fn serialize(&self, serializer: S) -> Result where @@ -56,6 +83,7 @@ impl<'a> serde::Serialize for HostStatus<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for HostStatus<'a> where 'de: 'a, @@ -67,20 +95,4 @@ where let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } -} -pub mod get_blob; -pub mod get_blocks; -pub mod get_checkout; -pub mod get_head; -pub mod get_host_status; -pub mod get_latest_commit; -pub mod get_record; -pub mod get_repo; -pub mod get_repo_status; -pub mod list_blobs; -pub mod list_hosts; -pub mod list_repos; -pub mod list_repos_by_collection; -pub mod notify_of_update; -pub mod request_crawl; -pub mod subscribe_repos; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_blob.rs b/crates/jacquard-api/src/com_atproto/sync/get_blob.rs index 35536d8..c36ccc0 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_blob.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_blob.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetBlobParams<'a> { @@ -6,6 +11,7 @@ pub struct GetBlobParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -35,6 +41,7 @@ pub enum GetBlobError<'a> { #[serde(rename = "RepoDeactivated")] RepoDeactivated(std::option::Option), } + impl std::fmt::Display for GetBlobError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -73,7 +80,7 @@ impl std::fmt::Display for GetBlobError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs b/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs index 0964923..4f108cc 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetBlocksParams<'a> { @@ -6,6 +11,7 @@ pub struct GetBlocksParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -35,6 +41,7 @@ pub enum GetBlocksError<'a> { #[serde(rename = "RepoDeactivated")] RepoDeactivated(std::option::Option), } + impl std::fmt::Display for GetBlocksError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -73,7 +80,7 @@ impl std::fmt::Display for GetBlocksError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_checkout.rs b/crates/jacquard-api/src/com_atproto/sync/get_checkout.rs index 5d25731..5e8db7f 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_checkout.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_checkout.rs @@ -1,10 +1,16 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetCheckoutParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct GetCheckoutOutput<'a> {} +pub struct GetCheckoutOutput<'a> {} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_head.rs b/crates/jacquard-api/src/com_atproto/sync/get_head.rs index ff790fa..b04ab38 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_head.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_head.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetHeadParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -11,6 +17,7 @@ pub struct GetHeadOutput<'a> { #[serde(borrow)] pub root: jacquard_common::types::string::Cid<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -28,6 +35,7 @@ pub enum GetHeadError<'a> { #[serde(rename = "HeadNotFound")] HeadNotFound(std::option::Option), } + impl std::fmt::Display for GetHeadError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -38,7 +46,7 @@ impl std::fmt::Display for GetHeadError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_host_status.rs b/crates/jacquard-api/src/com_atproto/sync/get_host_status.rs index d9a9873..b324d1f 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_host_status.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_host_status.rs @@ -1,23 +1,32 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetHostStatusParams<'a> { #[serde(borrow)] pub hostname: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetHostStatusOutput<'a> { + ///Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub account_count: std::option::Option, #[serde(borrow)] pub hostname: jacquard_common::CowStr<'a>, + ///Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). #[serde(skip_serializing_if = "std::option::Option::is_none")] pub seq: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -35,6 +44,7 @@ pub enum GetHostStatusError<'a> { #[serde(rename = "HostNotFound")] HostNotFound(std::option::Option), } + impl std::fmt::Display for GetHostStatusError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -45,7 +55,7 @@ impl std::fmt::Display for GetHostStatusError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_latest_commit.rs b/crates/jacquard-api/src/com_atproto/sync/get_latest_commit.rs index c76e8b1..1ffc6f6 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_latest_commit.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_latest_commit.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetLatestCommitParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -12,6 +18,7 @@ pub struct GetLatestCommitOutput<'a> { pub cid: jacquard_common::types::string::Cid<'a>, pub rev: jacquard_common::types::string::Tid, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -35,6 +42,7 @@ pub enum GetLatestCommitError<'a> { #[serde(rename = "RepoDeactivated")] RepoDeactivated(std::option::Option), } + impl std::fmt::Display for GetLatestCommitError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -66,7 +74,7 @@ impl std::fmt::Display for GetLatestCommitError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_record.rs b/crates/jacquard-api/src/com_atproto/sync/get_record.rs index c5d67e5..8a4f5d8 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_record.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_record.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRecordParams<'a> { @@ -10,6 +15,7 @@ pub struct GetRecordParams<'a> { jacquard_common::types::string::Rkey<'a>, >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -39,6 +45,7 @@ pub enum GetRecordError<'a> { #[serde(rename = "RepoDeactivated")] RepoDeactivated(std::option::Option), } + impl std::fmt::Display for GetRecordError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -77,7 +84,7 @@ impl std::fmt::Display for GetRecordError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_repo.rs b/crates/jacquard-api/src/com_atproto/sync/get_repo.rs index ae07261..c237e55 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_repo.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_repo.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRepoParams<'a> { @@ -6,6 +11,7 @@ pub struct GetRepoParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub since: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,7 +25,7 @@ pub struct GetRepoOutput<'a> {} PartialEq, Eq, thiserror::Error, - miette::Diagnostic, + miette::Diagnostic )] #[serde(tag = "error", content = "message")] #[serde(bound(deserialize = "'de: 'a"))] @@ -33,6 +39,7 @@ pub enum GetRepoError<'a> { #[serde(rename = "RepoDeactivated")] RepoDeactivated(std::option::Option), } + impl std::fmt::Display for GetRepoError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -67,4 +74,4 @@ impl std::fmt::Display for GetRepoError<'_> { Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/get_repo_status.rs b/crates/jacquard-api/src/com_atproto/sync/get_repo_status.rs index 0566595..fbad5f0 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_repo_status.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_repo_status.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRepoStatusParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -11,12 +17,15 @@ pub struct GetRepoStatusOutput<'a> { pub active: bool, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///Optional field, the current rev of the repo, if active=true #[serde(skip_serializing_if = "std::option::Option::is_none")] pub rev: std::option::Option, + ///If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -34,6 +43,7 @@ pub enum GetRepoStatusError<'a> { #[serde(rename = "RepoNotFound")] RepoNotFound(std::option::Option), } + impl std::fmt::Display for GetRepoStatusError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -44,7 +54,7 @@ impl std::fmt::Display for GetRepoStatusError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/list_blobs.rs b/crates/jacquard-api/src/com_atproto/sync/list_blobs.rs index 6ef517a..7bea7ff 100644 --- a/crates/jacquard-api/src/com_atproto/sync/list_blobs.rs +++ b/crates/jacquard-api/src/com_atproto/sync/list_blobs.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListBlobsParams<'a> { @@ -11,6 +16,7 @@ pub struct ListBlobsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub since: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -21,6 +27,7 @@ pub struct ListBlobsOutput<'a> { #[serde(borrow)] pub cursor: std::option::Option>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -44,6 +51,7 @@ pub enum ListBlobsError<'a> { #[serde(rename = "RepoDeactivated")] RepoDeactivated(std::option::Option), } + impl std::fmt::Display for ListBlobsError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -75,7 +83,7 @@ impl std::fmt::Display for ListBlobsError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/list_hosts.rs b/crates/jacquard-api/src/com_atproto/sync/list_hosts.rs index 0b591e2..106f348 100644 --- a/crates/jacquard-api/src/com_atproto/sync/list_hosts.rs +++ b/crates/jacquard-api/src/com_atproto/sync/list_hosts.rs @@ -1,17 +1,25 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Host<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub account_count: std::option::Option, + ///hostname of server; not a URL (no scheme) #[serde(borrow)] pub hostname: jacquard_common::CowStr<'a>, + ///Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). #[serde(skip_serializing_if = "std::option::Option::is_none")] pub seq: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, } + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListHostsParams<'a> { @@ -21,6 +29,7 @@ pub struct ListHostsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -28,6 +37,7 @@ pub struct ListHostsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, + ///Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first. #[serde(borrow)] pub hosts: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/list_repos.rs b/crates/jacquard-api/src/com_atproto/sync/list_repos.rs index c9f091c..c1fe03a 100644 --- a/crates/jacquard-api/src/com_atproto/sync/list_repos.rs +++ b/crates/jacquard-api/src/com_atproto/sync/list_repos.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListReposParams<'a> { @@ -7,6 +12,7 @@ pub struct ListReposParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -17,6 +23,7 @@ pub struct ListReposOutput<'a> { #[serde(borrow)] pub repos: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,10 +32,12 @@ pub struct Repo<'a> { pub active: std::option::Option, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///Current repo commit CID #[serde(borrow)] pub head: jacquard_common::types::string::Cid<'a>, pub rev: jacquard_common::types::string::Tid, + ///If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/list_repos_by_collection.rs b/crates/jacquard-api/src/com_atproto/sync/list_repos_by_collection.rs index 0b6786c..4580bf3 100644 --- a/crates/jacquard-api/src/com_atproto/sync/list_repos_by_collection.rs +++ b/crates/jacquard-api/src/com_atproto/sync/list_repos_by_collection.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListReposByCollectionParams<'a> { @@ -9,6 +14,7 @@ pub struct ListReposByCollectionParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,10 +25,11 @@ pub struct ListReposByCollectionOutput<'a> { #[serde(borrow)] pub repos: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Repo<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/notify_of_update.rs b/crates/jacquard-api/src/com_atproto/sync/notify_of_update.rs index 0a05b1f..4fe7994 100644 --- a/crates/jacquard-api/src/com_atproto/sync/notify_of_update.rs +++ b/crates/jacquard-api/src/com_atproto/sync/notify_of_update.rs @@ -1,7 +1,13 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct NotifyOfUpdateInput<'a> { + ///Hostname of the current service (usually a PDS) that is notifying of update. #[serde(borrow)] pub hostname: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/request_crawl.rs b/crates/jacquard-api/src/com_atproto/sync/request_crawl.rs index db0f2f1..9ec506f 100644 --- a/crates/jacquard-api/src/com_atproto/sync/request_crawl.rs +++ b/crates/jacquard-api/src/com_atproto/sync/request_crawl.rs @@ -1,10 +1,17 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RequestCrawlInput<'a> { + ///Hostname of the current service (eg, PDS) that is requesting to be crawled. #[serde(borrow)] pub hostname: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -22,6 +29,7 @@ pub enum RequestCrawlError<'a> { #[serde(rename = "HostBanned")] HostBanned(std::option::Option), } + impl std::fmt::Display for RequestCrawlError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -32,7 +40,7 @@ impl std::fmt::Display for RequestCrawlError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs b/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs index f7a90a0..a9a5d5d 100644 --- a/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs +++ b/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs @@ -1,17 +1,25 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Account<'a> { + ///Indicates that the account has a repository which can be fetched from the host that emitted this event. pub active: bool, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, pub seq: i64, + ///If active=false, this optional field indicates a reason for why the account is not active. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, pub time: jacquard_common::types::string::Datetime, } + ///Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -19,23 +27,34 @@ pub struct Account<'a> { pub struct Commit<'a> { #[serde(borrow)] pub blobs: Vec>, + ///CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. pub blocks: bytes::Bytes, + ///Repo commit object CID. #[serde(borrow)] pub commit: jacquard_common::types::cid::CidLink<'a>, #[serde(borrow)] - pub ops: Vec>, + pub ops: Vec>, + ///The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub prev_data: std::option::Option>, + ///DEPRECATED -- unused pub rebase: bool, + ///The repo this event comes from. Note that all other message types name this field 'did'. #[serde(borrow)] pub repo: jacquard_common::types::string::Did<'a>, + ///The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. pub rev: jacquard_common::types::string::Tid, + ///The stream sequence number of this message. pub seq: i64, + ///The rev of the last emitted commit from this repo (if any). pub since: jacquard_common::types::string::Tid, + ///Timestamp of when this message was originally broadcast. pub time: jacquard_common::types::string::Datetime, + ///DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. pub too_big: bool, } + ///Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -43,12 +62,14 @@ pub struct Commit<'a> { pub struct Identity<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub handle: std::option::Option>, pub seq: i64, pub time: jacquard_common::types::string::Datetime, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -59,12 +80,14 @@ pub struct Info<'a> { #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, } + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SubscribeReposParams { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub cursor: std::option::Option, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -81,6 +104,7 @@ pub enum SubscribeReposMessage<'a> { #[serde(rename = "#info")] Info(Box>), } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -101,6 +125,7 @@ pub enum SubscribeReposError<'a> { #[serde(rename = "ConsumerTooSlow")] ConsumerTooSlow(std::option::Option), } + impl std::fmt::Display for SubscribeReposError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -118,10 +143,11 @@ impl std::fmt::Display for SubscribeReposError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } } + ///A repo operation, ie a mutation of a single record. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -129,24 +155,32 @@ impl std::fmt::Display for SubscribeReposError<'_> { pub struct RepoOp<'a> { #[serde(borrow)] pub action: jacquard_common::CowStr<'a>, + ///For creates and updates, the new record CID. For deletions, null. #[serde(borrow)] pub cid: jacquard_common::types::cid::CidLink<'a>, #[serde(borrow)] pub path: jacquard_common::CowStr<'a>, + ///For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub prev: std::option::Option>, } + ///Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Sync<'a> { + ///CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. pub blocks: bytes::Bytes, + ///The account this repo event corresponds to. Must match that in the commit object. #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///The rev of the commit. This value must match that in the commit object. #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, + ///The stream sequence number of this message. pub seq: i64, + ///Timestamp of when this message was originally broadcast. pub time: jacquard_common::types::string::Datetime, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp.rs b/crates/jacquard-api/src/com_atproto/temp.rs index 4c9b29d..d8d777e 100644 --- a/crates/jacquard-api/src/com_atproto/temp.rs +++ b/crates/jacquard-api/src/com_atproto/temp.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + pub mod add_reserved_handle; pub mod check_handle_availability; pub mod check_signup_queue; pub mod dereference_scope; pub mod fetch_labels; pub mod request_phone_verification; -pub mod revoke_account_credentials; +pub mod revoke_account_credentials; \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/add_reserved_handle.rs b/crates/jacquard-api/src/com_atproto/temp/add_reserved_handle.rs index ae8488c..3661905 100644 --- a/crates/jacquard-api/src/com_atproto/temp/add_reserved_handle.rs +++ b/crates/jacquard-api/src/com_atproto/temp/add_reserved_handle.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,7 +10,8 @@ pub struct AddReservedHandleInput<'a> { #[serde(borrow)] pub handle: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct AddReservedHandleOutput<'a> {} +pub struct AddReservedHandleOutput<'a> {} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/check_handle_availability.rs b/crates/jacquard-api/src/com_atproto/temp/check_handle_availability.rs index ae0bab9..82f0a94 100644 --- a/crates/jacquard-api/src/com_atproto/temp/check_handle_availability.rs +++ b/crates/jacquard-api/src/com_atproto/temp/check_handle_availability.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CheckHandleAvailabilityParams<'a> { @@ -9,15 +14,18 @@ pub struct CheckHandleAvailabilityParams<'a> { #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CheckHandleAvailabilityOutput<'a> { + ///Echo of the input handle. #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, #[serde(borrow)] pub result: CheckHandleAvailabilityOutputRecordResult<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -41,6 +49,7 @@ pub enum CheckHandleAvailabilityError<'a> { #[serde(rename = "InvalidEmail")] InvalidEmail(std::option::Option), } + impl std::fmt::Display for CheckHandleAvailabilityError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -51,10 +60,11 @@ impl std::fmt::Display for CheckHandleAvailabilityError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } } + ///Indicates the provided handle is available. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -65,15 +75,20 @@ pub struct ResultAvailable<'a> {} #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ResultUnavailable<'a> { + ///List of suggested handles based on the provided inputs. #[serde(borrow)] - pub suggestions: Vec>, + pub suggestions: Vec< + crate::com_atproto::temp::check_handle_availability::Suggestion<'a>, + >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Suggestion<'a> { #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, + ///Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics. #[serde(borrow)] pub method: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/check_signup_queue.rs b/crates/jacquard-api/src/com_atproto/temp/check_signup_queue.rs index f36ff5e..f6b83ba 100644 --- a/crates/jacquard-api/src/com_atproto/temp/check_signup_queue.rs +++ b/crates/jacquard-api/src/com_atproto/temp/check_signup_queue.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,4 +12,4 @@ pub struct CheckSignupQueueOutput<'a> { pub estimated_time_ms: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub place_in_queue: std::option::Option, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/dereference_scope.rs b/crates/jacquard-api/src/com_atproto/temp/dereference_scope.rs index 4467228..a68ea0b 100644 --- a/crates/jacquard-api/src/com_atproto/temp/dereference_scope.rs +++ b/crates/jacquard-api/src/com_atproto/temp/dereference_scope.rs @@ -1,16 +1,24 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DereferenceScopeParams<'a> { #[serde(borrow)] pub scope: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DereferenceScopeOutput<'a> { + ///The full oauth permission scope #[serde(borrow)] pub scope: jacquard_common::CowStr<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -29,6 +37,7 @@ pub enum DereferenceScopeError<'a> { #[serde(rename = "InvalidScopeReference")] InvalidScopeReference(std::option::Option), } + impl std::fmt::Display for DereferenceScopeError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -39,7 +48,7 @@ impl std::fmt::Display for DereferenceScopeError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/fetch_labels.rs b/crates/jacquard-api/src/com_atproto/temp/fetch_labels.rs index 610e1dd..41153c0 100644 --- a/crates/jacquard-api/src/com_atproto/temp/fetch_labels.rs +++ b/crates/jacquard-api/src/com_atproto/temp/fetch_labels.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct FetchLabelsParams { @@ -6,10 +11,11 @@ pub struct FetchLabelsParams { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub since: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct FetchLabelsOutput<'a> { #[serde(borrow)] pub labels: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/request_phone_verification.rs b/crates/jacquard-api/src/com_atproto/temp/request_phone_verification.rs index 47e0738..4bd2cd3 100644 --- a/crates/jacquard-api/src/com_atproto/temp/request_phone_verification.rs +++ b/crates/jacquard-api/src/com_atproto/temp/request_phone_verification.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RequestPhoneVerificationInput<'a> { #[serde(borrow)] pub phone_number: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/com_atproto/temp/revoke_account_credentials.rs b/crates/jacquard-api/src/com_atproto/temp/revoke_account_credentials.rs index 351e6c1..53f3007 100644 --- a/crates/jacquard-api/src/com_atproto/temp/revoke_account_credentials.rs +++ b/crates/jacquard-api/src/com_atproto/temp/revoke_account_credentials.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RevokeAccountCredentialsInput<'a> { #[serde(borrow)] pub account: jacquard_common::types::ident::AtIdentifier<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/lib.rs b/crates/jacquard-api/src/lib.rs index c5c47e3..b347a8c 100644 --- a/crates/jacquard-api/src/lib.rs +++ b/crates/jacquard-api/src/lib.rs @@ -1,4 +1,9 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + pub mod app_bsky; pub mod chat_bsky; pub mod com_atproto; -pub mod tools_ozone; +pub mod tools_ozone; \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone.rs b/crates/jacquard-api/src/tools_ozone.rs index 1d2b4e8..ec0258d 100644 --- a/crates/jacquard-api/src/tools_ozone.rs +++ b/crates/jacquard-api/src/tools_ozone.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + pub mod communication; pub mod hosting; pub mod moderation; @@ -8,4 +13,4 @@ pub mod set; pub mod setting; pub mod signature; pub mod team; -pub mod verification; +pub mod verification; \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication.rs b/crates/jacquard-api/src/tools_ozone/communication.rs index 89c6b74..fbeeb98 100644 --- a/crates/jacquard-api/src/tools_ozone/communication.rs +++ b/crates/jacquard-api/src/tools_ozone/communication.rs @@ -1,25 +1,36 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod create_template; +pub mod delete_template; +pub mod list_templates; +pub mod update_template; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct TemplateView<'a> { + ///Subject of the message, used in emails. #[serde(borrow)] pub content_markdown: jacquard_common::CowStr<'a>, pub created_at: jacquard_common::types::string::Datetime, pub disabled: bool, #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, + ///Message language. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub lang: std::option::Option, + ///DID of the user who last updated the template. #[serde(borrow)] pub last_updated_by: jacquard_common::types::string::Did<'a>, + ///Name of the template. #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, + ///Content of the template, can contain markdown and variable placeholders. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject: std::option::Option>, pub updated_at: jacquard_common::types::string::Datetime, -} -pub mod create_template; -pub mod delete_template; -pub mod list_templates; -pub mod update_template; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication/create_template.rs b/crates/jacquard-api/src/tools_ozone/communication/create_template.rs index 4dbf81d..72c16b5 100644 --- a/crates/jacquard-api/src/tools_ozone/communication/create_template.rs +++ b/crates/jacquard-api/src/tools_ozone/communication/create_template.rs @@ -1,19 +1,30 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct CreateTemplateInput<'a> { + ///Content of the template, markdown supported, can contain variable placeholders. #[serde(borrow)] pub content_markdown: jacquard_common::CowStr<'a>, + ///DID of the user who is creating the template. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub created_by: std::option::Option>, + ///Message language. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub lang: std::option::Option, + ///Name of the template. #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, + ///Subject of the message, used in emails. #[serde(borrow)] pub subject: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,6 +33,7 @@ pub struct CreateTemplateOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::communication::TemplateView<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -39,6 +51,7 @@ pub enum CreateTemplateError<'a> { #[serde(rename = "DuplicateTemplateName")] DuplicateTemplateName(std::option::Option), } + impl std::fmt::Display for CreateTemplateError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -49,7 +62,7 @@ impl std::fmt::Display for CreateTemplateError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication/delete_template.rs b/crates/jacquard-api/src/tools_ozone/communication/delete_template.rs index 8320d2a..83f292e 100644 --- a/crates/jacquard-api/src/tools_ozone/communication/delete_template.rs +++ b/crates/jacquard-api/src/tools_ozone/communication/delete_template.rs @@ -1,7 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DeleteTemplateInput<'a> { #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication/list_templates.rs b/crates/jacquard-api/src/tools_ozone/communication/list_templates.rs index c928a4e..21ac299 100644 --- a/crates/jacquard-api/src/tools_ozone/communication/list_templates.rs +++ b/crates/jacquard-api/src/tools_ozone/communication/list_templates.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,4 +11,4 @@ pub struct ListTemplatesOutput<'a> { pub communication_templates: Vec< crate::tools_ozone::communication::TemplateView<'a>, >, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication/update_template.rs b/crates/jacquard-api/src/tools_ozone/communication/update_template.rs index 6e97085..f120c83 100644 --- a/crates/jacquard-api/src/tools_ozone/communication/update_template.rs +++ b/crates/jacquard-api/src/tools_ozone/communication/update_template.rs @@ -1,26 +1,38 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpdateTemplateInput<'a> { + ///Content of the template, markdown supported, can contain variable placeholders. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub content_markdown: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub disabled: std::option::Option, + ///ID of the template to be updated. #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, + ///Message language. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub lang: std::option::Option, + ///Name of the template. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub name: std::option::Option>, + ///Subject of the message, used in emails. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject: std::option::Option>, + ///DID of the user who is updating the template. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub updated_by: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -29,6 +41,7 @@ pub struct UpdateTemplateOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::communication::TemplateView<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -46,6 +59,7 @@ pub enum UpdateTemplateError<'a> { #[serde(rename = "DuplicateTemplateName")] DuplicateTemplateName(std::option::Option), } + impl std::fmt::Display for UpdateTemplateError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -56,7 +70,7 @@ impl std::fmt::Display for UpdateTemplateError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/hosting.rs b/crates/jacquard-api/src/tools_ozone/hosting.rs index 8049fce..e7d9326 100644 --- a/crates/jacquard-api/src/tools_ozone/hosting.rs +++ b/crates/jacquard-api/src/tools_ozone/hosting.rs @@ -1 +1,6 @@ -pub mod get_account_history; +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_account_history; \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs b/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs index 1ff3178..1c30b35 100644 --- a/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs +++ b/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -9,6 +14,7 @@ pub struct AccountCreated<'a> { #[serde(borrow)] pub handle: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -16,6 +22,7 @@ pub struct EmailConfirmed<'a> { #[serde(borrow)] pub email: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -23,6 +30,7 @@ pub struct EmailUpdated<'a> { #[serde(borrow)] pub email: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -33,6 +41,7 @@ pub struct Event<'a> { #[serde(borrow)] pub details: EventRecordDetails<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -45,6 +54,7 @@ pub struct HandleUpdated<'a> { #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, } + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetAccountHistoryParams<'a> { @@ -59,6 +69,7 @@ pub struct GetAccountHistoryParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -69,7 +80,8 @@ pub struct GetAccountHistoryOutput<'a> { #[serde(borrow)] pub events: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct PasswordUpdated<'a> {} +pub struct PasswordUpdated<'a> {} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation.rs b/crates/jacquard-api/src/tools_ozone/moderation.rs index 18772ee..dba6795 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation.rs @@ -1,8 +1,27 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod emit_event; +pub mod get_account_timeline; +pub mod get_event; +pub mod get_record; +pub mod get_records; +pub mod get_repo; +pub mod get_reporter_stats; +pub mod get_repos; +pub mod get_subjects; +pub mod query_events; +pub mod query_statuses; +pub mod search_repos; + ///Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AccountEvent<'a> { + ///Indicates that the account has a repository which can be fetched from the host that emitted this event. pub active: bool, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] @@ -12,6 +31,7 @@ pub struct AccountEvent<'a> { pub status: std::option::Option>, pub timestamp: jacquard_common::types::string::Datetime, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -29,55 +49,73 @@ pub struct AccountHosting<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub updated_at: std::option::Option, } + ///Statistics about a particular account subject #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AccountStats<'a> { + ///Total number of appeals against a moderation action on the account #[serde(skip_serializing_if = "std::option::Option::is_none")] pub appeal_count: std::option::Option, + ///Number of times the account was escalated #[serde(skip_serializing_if = "std::option::Option::is_none")] pub escalate_count: std::option::Option, + ///Total number of reports on the account #[serde(skip_serializing_if = "std::option::Option::is_none")] pub report_count: std::option::Option, + ///Number of times the account was suspended #[serde(skip_serializing_if = "std::option::Option::is_none")] pub suspend_count: std::option::Option, + ///Number of times the account was taken down #[serde(skip_serializing_if = "std::option::Option::is_none")] pub takedown_count: std::option::Option, } + ///Age assurance info coming directly from users. Only works on DID subjects. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AgeAssuranceEvent<'a> { + ///The unique identifier for this instance of the age assurance flow, in UUID format. #[serde(borrow)] pub attempt_id: jacquard_common::CowStr<'a>, + ///The IP address used when completing the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub complete_ip: std::option::Option>, + ///The user agent used when completing the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub complete_ua: std::option::Option>, + ///The date and time of this write operation. pub created_at: jacquard_common::types::string::Datetime, + ///The IP address used when initiating the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub init_ip: std::option::Option>, + ///The user agent used when initiating the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub init_ua: std::option::Option>, + ///The status of the age assurance process. #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, } + ///Age assurance status override by moderators. Only works on DID subjects. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AgeAssuranceOverrideEvent<'a> { + ///Comment describing the reason for the override. #[serde(borrow)] pub comment: jacquard_common::CowStr<'a>, + ///The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state. #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -92,9 +130,10 @@ pub struct BlobView<'a> { pub mime_type: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub moderation: std::option::Option>, + pub moderation: std::option::Option>, pub size: i64, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -118,6 +157,7 @@ pub struct IdentityEvent<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub tombstone: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -125,16 +165,19 @@ pub struct ImageDetails<'a> { pub height: i64, pub width: i64, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventAcknowledge<'a> { + ///If true, all other reports on content authored by this account will be resolved (acknowledged). #[serde(skip_serializing_if = "std::option::Option::is_none")] pub acknowledge_account_subjects: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } + ///Add a comment to a subject. An empty comment will clear any previously set sticky comment. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -143,9 +186,11 @@ pub struct ModEventComment<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Make the comment persistent on the subject #[serde(skip_serializing_if = "std::option::Option::is_none")] pub sticky: std::option::Option, } + ///Divert a record's blobs to a 3rd party service for further scanning/tagging #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -155,20 +200,25 @@ pub struct ModEventDivert<'a> { #[serde(borrow)] pub comment: std::option::Option>, } + ///Keep a log of outgoing email to a user #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventEmail<'a> { + ///Additional comment about the outgoing comm. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///The content of the email sent to the user. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub content: std::option::Option>, + ///The subject line of the email sent to the user. #[serde(borrow)] pub subject_line: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -177,6 +227,7 @@ pub struct ModEventEscalate<'a> { #[serde(borrow)] pub comment: std::option::Option>, } + ///Apply/Negate labels on a subject #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -187,11 +238,13 @@ pub struct ModEventLabel<'a> { pub comment: std::option::Option>, #[serde(borrow)] pub create_label_vals: Vec>, + ///Indicates how long the label will remain on the subject. Only applies on labels that are being added. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub duration_in_hours: std::option::Option, #[serde(borrow)] pub negate_label_vals: Vec>, } + ///Mute incoming reports on a subject #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -200,8 +253,10 @@ pub struct ModEventMute<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Indicates how long the subject should remain muted. pub duration_in_hours: i64, } + ///Mute incoming reports from an account #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -210,9 +265,11 @@ pub struct ModEventMuteReporter<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Indicates how long the account should remain muted. Falsy value here means a permanent mute. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub duration_in_hours: std::option::Option, } + ///Set priority score of the subject. Higher score means higher priority. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -223,6 +280,7 @@ pub struct ModEventPriorityScore<'a> { pub comment: std::option::Option>, pub score: i64, } + ///Report a subject #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -231,76 +289,94 @@ pub struct ModEventReport<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub is_reporter_muted: std::option::Option, #[serde(borrow)] pub report_type: crate::com_atproto::moderation::ReasonType<'a>, } + ///Resolve appeal on a subject #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventResolveAppeal<'a> { + ///Describe resolution. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } + ///Revert take down action on a subject #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventReverseTakedown<'a> { + ///Describe reasoning behind the reversal. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } + ///Add/Remove a tag on a subject #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventTag<'a> { + ///Tags to be added to the subject. If already exists, won't be duplicated. #[serde(borrow)] pub add: Vec>, + ///Additional comment about added/removed tags. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. #[serde(borrow)] pub remove: Vec>, } + ///Take down a subject permanently or temporarily #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventTakedown<'a> { + ///If true, all other reports on content authored by this account will be resolved (acknowledged). #[serde(skip_serializing_if = "std::option::Option::is_none")] pub acknowledge_account_subjects: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Indicates how long the takedown should be in effect before automatically expiring. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub duration_in_hours: std::option::Option, + ///Names/Keywords of the policies that drove the decision. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub policies: std::option::Option>>, } + ///Unmute action on a subject #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventUnmute<'a> { + ///Describe reasoning behind the reversal. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } + ///Unmute incoming reports from an account #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventUnmuteReporter<'a> { + ///Describe reasoning behind the reversal. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -316,7 +392,7 @@ pub struct ModEventView<'a> { pub id: i64, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub mod_tool: std::option::Option>, + pub mod_tool: std::option::Option>, #[serde(borrow)] pub subject: ModEventViewRecordSubject<'a>, #[serde(borrow)] @@ -325,6 +401,7 @@ pub struct ModEventView<'a> { #[serde(borrow)] pub subject_handle: std::option::Option>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -342,6 +419,7 @@ pub enum ModEventViewRecordSubject<'a> { #[serde(rename = "chat.bsky.convo.defs#messageRef")] DefsMessageRef(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -354,12 +432,13 @@ pub struct ModEventViewDetail<'a> { pub id: i64, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub mod_tool: std::option::Option>, + pub mod_tool: std::option::Option>, #[serde(borrow)] pub subject: ModEventViewDetailRecordSubject<'a>, #[serde(borrow)] - pub subject_blobs: Vec>, + pub subject_blobs: Vec>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -375,28 +454,37 @@ pub enum ModEventViewDetailRecordSubject<'a> {} #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModTool<'a> { + ///Additional arbitrary metadata about the source #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub meta: std::option::Option>, + ///Name/identifier of the source (e.g., 'automod', 'ozone/workspace') #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Moderation<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub subject_status: std::option::Option>, + pub subject_status: std::option::Option< + crate::tools_ozone::moderation::SubjectStatusView<'a>, + >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModerationDetail<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub subject_status: std::option::Option>, + pub subject_status: std::option::Option< + crate::tools_ozone::moderation::SubjectStatusView<'a>, + >, } + ///Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -412,6 +500,7 @@ pub struct RecordEvent<'a> { pub op: jacquard_common::CowStr<'a>, pub timestamp: jacquard_common::types::string::Datetime, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -425,6 +514,7 @@ pub struct RecordHosting<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub updated_at: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -435,20 +525,21 @@ pub struct RecordView<'a> { pub cid: jacquard_common::types::string::Cid<'a>, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(borrow)] - pub moderation: jacquard_common::types::value::Data<'a>, + pub moderation: crate::tools_ozone::moderation::Moderation<'a>, #[serde(borrow)] - pub repo: jacquard_common::types::value::Data<'a>, + pub repo: crate::tools_ozone::moderation::RepoView<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RecordViewDetail<'a> { #[serde(borrow)] - pub blobs: Vec>, + pub blobs: Vec>, #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, pub indexed_at: jacquard_common::types::string::Datetime, @@ -456,14 +547,15 @@ pub struct RecordViewDetail<'a> { #[serde(borrow)] pub labels: std::option::Option>>, #[serde(borrow)] - pub moderation: jacquard_common::types::value::Data<'a>, + pub moderation: crate::tools_ozone::moderation::ModerationDetail<'a>, #[serde(borrow)] - pub repo: jacquard_common::types::value::Data<'a>, + pub repo: crate::tools_ozone::moderation::RepoView<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -471,28 +563,38 @@ pub struct RecordViewNotFound<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + ///Statistics about a set of record subject items #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RecordsStats<'a> { + ///Number of items that were appealed at least once #[serde(skip_serializing_if = "std::option::Option::is_none")] pub appealed_count: std::option::Option, + ///Number of items that were escalated at least once #[serde(skip_serializing_if = "std::option::Option::is_none")] pub escalated_count: std::option::Option, + ///Number of item currently in "reviewOpen" or "reviewEscalated" state #[serde(skip_serializing_if = "std::option::Option::is_none")] pub pending_count: std::option::Option, + ///Number of item currently in "reviewNone" or "reviewClosed" state #[serde(skip_serializing_if = "std::option::Option::is_none")] pub processed_count: std::option::Option, + ///Number of items that were reported at least once #[serde(skip_serializing_if = "std::option::Option::is_none")] pub reported_count: std::option::Option, + ///Total number of item in the set #[serde(skip_serializing_if = "std::option::Option::is_none")] pub subject_count: std::option::Option, + ///Number of item currently taken down #[serde(skip_serializing_if = "std::option::Option::is_none")] pub takendown_count: std::option::Option, + ///Cumulative sum of the number of reports on the items in the set #[serde(skip_serializing_if = "std::option::Option::is_none")] pub total_reports: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -516,7 +618,7 @@ pub struct RepoView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub invites_disabled: std::option::Option, #[serde(borrow)] - pub moderation: jacquard_common::types::value::Data<'a>, + pub moderation: crate::tools_ozone::moderation::Moderation<'a>, #[serde(borrow)] pub related_records: Vec>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -525,6 +627,7 @@ pub struct RepoView<'a> { Vec>, >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -558,7 +661,7 @@ pub struct RepoViewDetail<'a> { #[serde(borrow)] pub labels: std::option::Option>>, #[serde(borrow)] - pub moderation: jacquard_common::types::value::Data<'a>, + pub moderation: crate::tools_ozone::moderation::ModerationDetail<'a>, #[serde(borrow)] pub related_records: Vec>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -567,6 +670,7 @@ pub struct RepoViewDetail<'a> { Vec>, >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -574,29 +678,41 @@ pub struct RepoViewNotFound<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ReporterStats<'a> { + ///The total number of reports made by the user on accounts. pub account_report_count: i64, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, + ///The total number of accounts labeled as a result of the user's reports. pub labeled_account_count: i64, + ///The total number of records labeled as a result of the user's reports. pub labeled_record_count: i64, + ///The total number of reports made by the user on records. pub record_report_count: i64, + ///The total number of accounts reported by the user. pub reported_account_count: i64, + ///The total number of records reported by the user. pub reported_record_count: i64, + ///The total number of accounts taken down as a result of the user's reports. pub takendown_account_count: i64, + ///The total number of records taken down as a result of the user's reports. pub takendown_record_count: i64, } + ///Account credentials revocation by moderators. Only works on DID subjects. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RevokeAccountCredentialsEvent<'a> { + ///Comment describing the reason for the revocation. #[serde(borrow)] pub comment: jacquard_common::CowStr<'a>, } + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum SubjectReviewState<'a> { ReviewOpen, @@ -605,6 +721,7 @@ pub enum SubjectReviewState<'a> { ReviewNone, Other(jacquard_common::CowStr<'a>), } + impl<'a> SubjectReviewState<'a> { pub fn as_str(&self) -> &str { match self { @@ -616,6 +733,7 @@ impl<'a> SubjectReviewState<'a> { } } } + impl<'a> From<&'a str> for SubjectReviewState<'a> { fn from(s: &'a str) -> Self { match s { @@ -627,6 +745,7 @@ impl<'a> From<&'a str> for SubjectReviewState<'a> { } } } + impl<'a> From for SubjectReviewState<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -638,11 +757,13 @@ impl<'a> From for SubjectReviewState<'a> { } } } + impl<'a> AsRef for SubjectReviewState<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for SubjectReviewState<'a> { fn serialize(&self, serializer: S) -> Result where @@ -651,6 +772,7 @@ impl<'a> serde::Serialize for SubjectReviewState<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for SubjectReviewState<'a> where 'de: 'a, @@ -663,29 +785,39 @@ where Ok(Self::from(s)) } } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SubjectStatusView<'a> { + ///Statistics related to the account subject #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub account_stats: std::option::Option>, + pub account_stats: std::option::Option< + crate::tools_ozone::moderation::AccountStats<'a>, + >, + ///Current age assurance state of the subject. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub age_assurance_state: std::option::Option>, + ///Whether or not the last successful update to age assurance was made by the user or admin. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub age_assurance_updated_by: std::option::Option>, + ///True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub appealed: std::option::Option, + ///Sticky comment on the subject. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Timestamp referencing the first moderation status impacting event was emitted on the subject pub created_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub hosting: std::option::Option>, pub id: i64, + ///Timestamp referencing when the author of the subject appealed a moderation action #[serde(skip_serializing_if = "std::option::Option::is_none")] pub last_appealed_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -701,13 +833,17 @@ pub struct SubjectStatusView<'a> { >, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub mute_until: std::option::Option, + ///Numeric value representing the level of priority. Higher score means higher priority. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub priority_score: std::option::Option, + ///Statistics related to the record subjects authored by the subject's account #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub records_stats: std::option::Option>, + pub records_stats: std::option::Option< + crate::tools_ozone::moderation::RecordsStats<'a>, + >, #[serde(borrow)] - pub review_state: jacquard_common::types::value::Data<'a>, + pub review_state: crate::tools_ozone::moderation::SubjectReviewState<'a>, #[serde(borrow)] pub subject: SubjectStatusViewRecordSubject<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -725,8 +861,10 @@ pub struct SubjectStatusView<'a> { pub tags: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub takendown: std::option::Option, + ///Timestamp referencing when the last update was made to the moderation status of the subject pub updated_at: jacquard_common::types::string::Datetime, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -744,6 +882,7 @@ pub enum SubjectStatusViewRecordSubject<'a> { #[serde(rename = "chat.bsky.convo.defs#messageRef")] DefsMessageRef(Box>), } + ///Detailed view of a subject. For record subjects, the author's repo and profile will be returned. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -754,18 +893,23 @@ pub struct SubjectView<'a> { pub profile: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub record: std::option::Option>, + pub record: std::option::Option< + crate::tools_ozone::moderation::RecordViewDetail<'a>, + >, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub repo: std::option::Option>, + pub repo: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub status: std::option::Option>, + pub status: std::option::Option< + crate::tools_ozone::moderation::SubjectStatusView<'a>, + >, #[serde(borrow)] pub subject: jacquard_common::CowStr<'a>, #[serde(borrow)] pub r#type: crate::com_atproto::moderation::SubjectType<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -778,16 +922,4 @@ pub struct VideoDetails<'a> { pub height: i64, pub length: i64, pub width: i64, -} -pub mod emit_event; -pub mod get_account_timeline; -pub mod get_event; -pub mod get_record; -pub mod get_records; -pub mod get_repo; -pub mod get_reporter_stats; -pub mod get_repos; -pub mod get_subjects; -pub mod query_events; -pub mod query_statuses; -pub mod search_repos; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs b/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs index 8a376a7..3cbf621 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,6 +11,7 @@ pub struct EmitEventInput<'a> { pub created_by: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub event: EmitEventInputRecordEvent<'a>, + ///An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub external_id: std::option::Option>, @@ -20,6 +26,7 @@ pub struct EmitEventInput<'a> { Vec>, >, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -86,6 +93,7 @@ pub enum EmitEventInputRecordEvent<'a> { Box>, ), } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -96,6 +104,7 @@ pub enum EmitEventInputRecordSubject<'a> { #[serde(rename = "com.atproto.repo.strongRef")] StrongRef(Box>), } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -104,6 +113,7 @@ pub struct EmitEventOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::moderation::ModEventView<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -124,6 +134,7 @@ pub enum EmitEventError<'a> { #[serde(rename = "DuplicateExternalId")] DuplicateExternalId(std::option::Option), } + impl std::fmt::Display for EmitEventError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -141,7 +152,7 @@ impl std::fmt::Display for EmitEventError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs index 0075d60..7c7539d 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetAccountTimelineParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -11,6 +17,7 @@ pub struct GetAccountTimelineOutput<'a> { #[serde(borrow)] pub timeline: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -28,6 +35,7 @@ pub enum GetAccountTimelineError<'a> { #[serde(rename = "RepoNotFound")] RepoNotFound(std::option::Option), } + impl std::fmt::Display for GetAccountTimelineError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -38,10 +46,11 @@ impl std::fmt::Display for GetAccountTimelineError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -49,8 +58,11 @@ pub struct TimelineItem<'a> { #[serde(borrow)] pub day: jacquard_common::CowStr<'a>, #[serde(borrow)] - pub summary: Vec>, + pub summary: Vec< + crate::tools_ozone::moderation::get_account_timeline::TimelineItemSummary<'a>, + >, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -60,4 +72,4 @@ pub struct TimelineItemSummary<'a> { pub event_subject_type: jacquard_common::CowStr<'a>, #[serde(borrow)] pub event_type: jacquard_common::CowStr<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_event.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_event.rs index 7672017..b980244 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_event.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_event.rs @@ -1,8 +1,14 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetEventParams { pub id: i64, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -10,4 +16,4 @@ pub struct GetEventOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::tools_ozone::moderation::ModEventViewDetail<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_record.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_record.rs index 37a3c53..83b960d 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_record.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_record.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRecordParams<'a> { @@ -7,6 +12,7 @@ pub struct GetRecordParams<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -15,6 +21,7 @@ pub struct GetRecordOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::moderation::RecordViewDetail<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -32,6 +39,7 @@ pub enum GetRecordError<'a> { #[serde(rename = "RecordNotFound")] RecordNotFound(std::option::Option), } + impl std::fmt::Display for GetRecordError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -42,7 +50,7 @@ impl std::fmt::Display for GetRecordError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_records.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_records.rs index d432924..d7e3568 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_records.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_records.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRecordsParams<'a> { #[serde(borrow)] pub uris: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRecordsOutput<'a> { #[serde(borrow)] pub records: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_repo.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_repo.rs index 6eafd93..0cb6706 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_repo.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_repo.rs @@ -1,9 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetRepoParams<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -12,6 +18,7 @@ pub struct GetRepoOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::moderation::RepoViewDetail<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -29,6 +36,7 @@ pub enum GetRepoError<'a> { #[serde(rename = "RepoNotFound")] RepoNotFound(std::option::Option), } + impl std::fmt::Display for GetRepoError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -39,7 +47,7 @@ impl std::fmt::Display for GetRepoError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_reporter_stats.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_reporter_stats.rs index 6ad64bf..7d3703d 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_reporter_stats.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_reporter_stats.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetReporterStatsParams<'a> { #[serde(borrow)] pub dids: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetReporterStatsOutput<'a> { #[serde(borrow)] pub stats: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_repos.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_repos.rs index 6433a9b..ea1cc37 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_repos.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_repos.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetReposParams<'a> { #[serde(borrow)] pub dids: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetReposOutput<'a> { #[serde(borrow)] pub repos: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_subjects.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_subjects.rs index b5968bc..b7f13a9 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_subjects.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_subjects.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSubjectsParams<'a> { #[serde(borrow)] pub subjects: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetSubjectsOutput<'a> { #[serde(borrow)] pub subjects: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/query_events.rs b/crates/jacquard-api/src/tools_ozone/moderation/query_events.rs index a354274..b1d1ec4 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/query_events.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/query_events.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct QueryEventsParams<'a> { @@ -63,6 +68,7 @@ pub struct QueryEventsParams<'a> { #[serde(borrow)] pub types: std::option::Option>>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -72,4 +78,4 @@ pub struct QueryEventsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub events: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/query_statuses.rs b/crates/jacquard-api/src/tools_ozone/moderation/query_statuses.rs index c537e29..7f6d230 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/query_statuses.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/query_statuses.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct QueryStatusesParams<'a> { @@ -97,6 +102,7 @@ pub struct QueryStatusesParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub takendown: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -106,4 +112,4 @@ pub struct QueryStatusesOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub subject_statuses: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/moderation/search_repos.rs b/crates/jacquard-api/src/tools_ozone/moderation/search_repos.rs index 040b2d2..45e248d 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/search_repos.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/search_repos.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchReposParams<'a> { @@ -13,6 +18,7 @@ pub struct SearchReposParams<'a> { #[serde(borrow)] pub term: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -22,4 +28,4 @@ pub struct SearchReposOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub repos: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/report.rs b/crates/jacquard-api/src/tools_ozone/report.rs index 65bd384..0180f4b 100644 --- a/crates/jacquard-api/src/tools_ozone/report.rs +++ b/crates/jacquard-api/src/tools_ozone/report.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ReasonType<'a> { ToolsOzoneReportDefsReasonAppeal, @@ -47,6 +52,7 @@ pub enum ReasonType<'a> { ToolsOzoneReportDefsReasonCivicImpersonation, Other(jacquard_common::CowStr<'a>), } + impl<'a> ReasonType<'a> { pub fn as_str(&self) -> &str { match self { @@ -189,6 +195,7 @@ impl<'a> ReasonType<'a> { } } } + impl<'a> From<&'a str> for ReasonType<'a> { fn from(s: &'a str) -> Self { match s { @@ -331,6 +338,7 @@ impl<'a> From<&'a str> for ReasonType<'a> { } } } + impl<'a> From for ReasonType<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -473,11 +481,13 @@ impl<'a> From for ReasonType<'a> { } } } + impl<'a> AsRef for ReasonType<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for ReasonType<'a> { fn serialize(&self, serializer: S) -> Result where @@ -486,6 +496,7 @@ impl<'a> serde::Serialize for ReasonType<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for ReasonType<'a> where 'de: 'a, @@ -497,4 +508,4 @@ where let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink.rs b/crates/jacquard-api/src/tools_ozone/safelink.rs index 6d96c21..5df7204 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink.rs @@ -1,3 +1,14 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod add_rule; +pub mod query_events; +pub mod query_rules; +pub mod remove_rule; +pub mod update_rule; + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ActionType<'a> { Block, @@ -5,6 +16,7 @@ pub enum ActionType<'a> { Whitelist, Other(jacquard_common::CowStr<'a>), } + impl<'a> ActionType<'a> { pub fn as_str(&self) -> &str { match self { @@ -15,6 +27,7 @@ impl<'a> ActionType<'a> { } } } + impl<'a> From<&'a str> for ActionType<'a> { fn from(s: &'a str) -> Self { match s { @@ -25,6 +38,7 @@ impl<'a> From<&'a str> for ActionType<'a> { } } } + impl<'a> From for ActionType<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -35,11 +49,13 @@ impl<'a> From for ActionType<'a> { } } } + impl<'a> AsRef for ActionType<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for ActionType<'a> { fn serialize(&self, serializer: S) -> Result where @@ -48,6 +64,7 @@ impl<'a> serde::Serialize for ActionType<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for ActionType<'a> where 'de: 'a, @@ -60,29 +77,35 @@ where Ok(Self::from(s)) } } + ///An event for URL safety decisions #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Event<'a> { #[serde(borrow)] - pub action: jacquard_common::types::value::Data<'a>, + pub action: crate::tools_ozone::safelink::ActionType<'a>, + ///Optional comment about the decision #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, pub created_at: jacquard_common::types::string::Datetime, + ///DID of the user who created this rule #[serde(borrow)] pub created_by: jacquard_common::types::string::Did<'a>, #[serde(borrow)] - pub event_type: jacquard_common::types::value::Data<'a>, + pub event_type: crate::tools_ozone::safelink::EventType<'a>, + ///Auto-incrementing row ID pub id: i64, #[serde(borrow)] - pub pattern: jacquard_common::types::value::Data<'a>, + pub pattern: crate::tools_ozone::safelink::PatternType<'a>, #[serde(borrow)] - pub reason: jacquard_common::types::value::Data<'a>, + pub reason: crate::tools_ozone::safelink::ReasonType<'a>, + ///The URL that this rule applies to #[serde(borrow)] pub url: jacquard_common::CowStr<'a>, } + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum EventType<'a> { AddRule, @@ -90,6 +113,7 @@ pub enum EventType<'a> { RemoveRule, Other(jacquard_common::CowStr<'a>), } + impl<'a> EventType<'a> { pub fn as_str(&self) -> &str { match self { @@ -100,6 +124,7 @@ impl<'a> EventType<'a> { } } } + impl<'a> From<&'a str> for EventType<'a> { fn from(s: &'a str) -> Self { match s { @@ -110,6 +135,7 @@ impl<'a> From<&'a str> for EventType<'a> { } } } + impl<'a> From for EventType<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -120,11 +146,13 @@ impl<'a> From for EventType<'a> { } } } + impl<'a> AsRef for EventType<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for EventType<'a> { fn serialize(&self, serializer: S) -> Result where @@ -133,6 +161,7 @@ impl<'a> serde::Serialize for EventType<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for EventType<'a> where 'de: 'a, @@ -145,12 +174,14 @@ where Ok(Self::from(s)) } } + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum PatternType<'a> { Domain, Url, Other(jacquard_common::CowStr<'a>), } + impl<'a> PatternType<'a> { pub fn as_str(&self) -> &str { match self { @@ -160,6 +191,7 @@ impl<'a> PatternType<'a> { } } } + impl<'a> From<&'a str> for PatternType<'a> { fn from(s: &'a str) -> Self { match s { @@ -169,6 +201,7 @@ impl<'a> From<&'a str> for PatternType<'a> { } } } + impl<'a> From for PatternType<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -178,11 +211,13 @@ impl<'a> From for PatternType<'a> { } } } + impl<'a> AsRef for PatternType<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for PatternType<'a> { fn serialize(&self, serializer: S) -> Result where @@ -191,6 +226,7 @@ impl<'a> serde::Serialize for PatternType<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for PatternType<'a> where 'de: 'a, @@ -203,6 +239,7 @@ where Ok(Self::from(s)) } } + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ReasonType<'a> { Csam, @@ -211,6 +248,7 @@ pub enum ReasonType<'a> { None, Other(jacquard_common::CowStr<'a>), } + impl<'a> ReasonType<'a> { pub fn as_str(&self) -> &str { match self { @@ -222,6 +260,7 @@ impl<'a> ReasonType<'a> { } } } + impl<'a> From<&'a str> for ReasonType<'a> { fn from(s: &'a str) -> Self { match s { @@ -233,6 +272,7 @@ impl<'a> From<&'a str> for ReasonType<'a> { } } } + impl<'a> From for ReasonType<'a> { fn from(s: String) -> Self { match s.as_str() { @@ -244,11 +284,13 @@ impl<'a> From for ReasonType<'a> { } } } + impl<'a> AsRef for ReasonType<'a> { fn as_ref(&self) -> &str { self.as_str() } } + impl<'a> serde::Serialize for ReasonType<'a> { fn serialize(&self, serializer: S) -> Result where @@ -257,6 +299,7 @@ impl<'a> serde::Serialize for ReasonType<'a> { serializer.serialize_str(self.as_str()) } } + impl<'de, 'a> serde::Deserialize<'de> for ReasonType<'a> where 'de: 'a, @@ -269,29 +312,30 @@ where Ok(Self::from(s)) } } + ///Input for creating a URL safety rule #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UrlRule<'a> { #[serde(borrow)] - pub action: jacquard_common::types::value::Data<'a>, + pub action: crate::tools_ozone::safelink::ActionType<'a>, + ///Optional comment about the decision #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Timestamp when the rule was created pub created_at: jacquard_common::types::string::Datetime, + ///DID of the user added the rule. #[serde(borrow)] pub created_by: jacquard_common::types::string::Did<'a>, #[serde(borrow)] - pub pattern: jacquard_common::types::value::Data<'a>, + pub pattern: crate::tools_ozone::safelink::PatternType<'a>, #[serde(borrow)] - pub reason: jacquard_common::types::value::Data<'a>, + pub reason: crate::tools_ozone::safelink::ReasonType<'a>, + ///Timestamp when the rule was last updated pub updated_at: jacquard_common::types::string::Datetime, + ///The URL or domain to apply the rule to #[serde(borrow)] pub url: jacquard_common::CowStr<'a>, -} -pub mod add_rule; -pub mod query_events; -pub mod query_rules; -pub mod remove_rule; -pub mod update_rule; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs b/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs index 6611150..1bff0bc 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs @@ -1,12 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AddRuleInput<'a> { #[serde(borrow)] pub action: crate::tools_ozone::safelink::ActionType<'a>, + ///Optional comment about the decision #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Author DID. Only respected when using admin auth #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub created_by: std::option::Option>, @@ -14,9 +21,11 @@ pub struct AddRuleInput<'a> { pub pattern: crate::tools_ozone::safelink::PatternType<'a>, #[serde(borrow)] pub reason: crate::tools_ozone::safelink::ReasonType<'a>, + ///The URL or domain to apply the rule to #[serde(borrow)] pub url: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,6 +34,7 @@ pub struct AddRuleOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::safelink::Event<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -46,6 +56,7 @@ pub enum AddRuleError<'a> { #[serde(rename = "RuleAlreadyExists")] RuleAlreadyExists(std::option::Option), } + impl std::fmt::Display for AddRuleError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -63,7 +74,7 @@ impl std::fmt::Display for AddRuleError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink/query_events.rs b/crates/jacquard-api/src/tools_ozone/safelink/query_events.rs index be2ba25..35aff0f 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/query_events.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/query_events.rs @@ -1,29 +1,41 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct QueryEventsInput<'a> { + ///Cursor for pagination #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, + ///Maximum number of results to return #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, + ///Filter by pattern type #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pattern_type: std::option::Option>, + ///Sort direction #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub sort_direction: std::option::Option>, + ///Filter by specific URLs or domains #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub urls: std::option::Option>>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct QueryEventsOutput<'a> { + ///Next cursor for pagination. Only present if there are more results. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, #[serde(borrow)] pub events: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink/query_rules.rs b/crates/jacquard-api/src/tools_ozone/safelink/query_rules.rs index b8733d1..edc77fa 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/query_rules.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/query_rules.rs @@ -1,38 +1,53 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct QueryRulesInput<'a> { + ///Filter by action types #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub actions: std::option::Option>>, + ///Filter by rule creator #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub created_by: std::option::Option>, + ///Cursor for pagination #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, + ///Maximum number of results to return #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, + ///Filter by pattern type #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pattern_type: std::option::Option>, + ///Filter by reason type #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub reason: std::option::Option>, + ///Sort direction #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub sort_direction: std::option::Option>, + ///Filter by specific URLs or domains #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub urls: std::option::Option>>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct QueryRulesOutput<'a> { + ///Next cursor for pagination. Only present if there are more results. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, #[serde(borrow)] pub rules: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs b/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs index 15ba786..42ecedd 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs @@ -1,18 +1,27 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RemoveRuleInput<'a> { + ///Optional comment about why the rule is being removed #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Optional DID of the user. Only respected when using admin auth. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub created_by: std::option::Option>, #[serde(borrow)] pub pattern: crate::tools_ozone::safelink::PatternType<'a>, + ///The URL or domain to remove the rule for #[serde(borrow)] pub url: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -21,6 +30,7 @@ pub struct RemoveRuleOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::safelink::Event<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -39,6 +49,7 @@ pub enum RemoveRuleError<'a> { #[serde(rename = "RuleNotFound")] RuleNotFound(std::option::Option), } + impl std::fmt::Display for RemoveRuleError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -49,7 +60,7 @@ impl std::fmt::Display for RemoveRuleError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs b/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs index cbf6126..989c756 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs @@ -1,12 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpdateRuleInput<'a> { #[serde(borrow)] pub action: crate::tools_ozone::safelink::ActionType<'a>, + ///Optional comment about the update #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, + ///Optional DID to credit as the creator. Only respected for admin_token authentication. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub created_by: std::option::Option>, @@ -14,9 +21,11 @@ pub struct UpdateRuleInput<'a> { pub pattern: crate::tools_ozone::safelink::PatternType<'a>, #[serde(borrow)] pub reason: crate::tools_ozone::safelink::ReasonType<'a>, + ///The URL or domain to update the rule for #[serde(borrow)] pub url: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,6 +34,7 @@ pub struct UpdateRuleOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::safelink::Event<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -43,6 +53,7 @@ pub enum UpdateRuleError<'a> { #[serde(rename = "RuleNotFound")] RuleNotFound(std::option::Option), } + impl std::fmt::Display for UpdateRuleError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -53,7 +64,7 @@ impl std::fmt::Display for UpdateRuleError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/server.rs b/crates/jacquard-api/src/tools_ozone/server.rs index f664186..8e473b5 100644 --- a/crates/jacquard-api/src/tools_ozone/server.rs +++ b/crates/jacquard-api/src/tools_ozone/server.rs @@ -1 +1,6 @@ -pub mod get_config; +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_config; \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/server/get_config.rs b/crates/jacquard-api/src/tools_ozone/server/get_config.rs index cfa4045..d086f4d 100644 --- a/crates/jacquard-api/src/tools_ozone/server/get_config.rs +++ b/crates/jacquard-api/src/tools_ozone/server/get_config.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -14,6 +19,7 @@ pub struct GetConfigOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pds: std::option::Option>, + ///The did of the verifier used for verification. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub verifier_did: std::option::Option>, @@ -21,6 +27,7 @@ pub struct GetConfigOutput<'a> { #[serde(borrow)] pub viewer: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -29,6 +36,7 @@ pub struct ServiceConfig<'a> { #[serde(borrow)] pub url: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -36,4 +44,4 @@ pub struct ViewerConfig<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub role: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set.rs b/crates/jacquard-api/src/tools_ozone/set.rs index e271b56..08d83dc 100644 --- a/crates/jacquard-api/src/tools_ozone/set.rs +++ b/crates/jacquard-api/src/tools_ozone/set.rs @@ -1,3 +1,15 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod add_values; +pub mod delete_set; +pub mod delete_values; +pub mod get_values; +pub mod query_sets; +pub mod upsert_set; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -8,6 +20,7 @@ pub struct Set<'a> { #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -20,10 +33,4 @@ pub struct SetView<'a> { pub name: jacquard_common::CowStr<'a>, pub set_size: i64, pub updated_at: jacquard_common::types::string::Datetime, -} -pub mod add_values; -pub mod delete_set; -pub mod delete_values; -pub mod get_values; -pub mod query_sets; -pub mod upsert_set; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/add_values.rs b/crates/jacquard-api/src/tools_ozone/set/add_values.rs index e3ed397..7250bcd 100644 --- a/crates/jacquard-api/src/tools_ozone/set/add_values.rs +++ b/crates/jacquard-api/src/tools_ozone/set/add_values.rs @@ -1,9 +1,16 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AddValuesInput<'a> { + ///Name of the set to add values to #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, + ///Array of string values to add to the set #[serde(borrow)] pub values: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/delete_set.rs b/crates/jacquard-api/src/tools_ozone/set/delete_set.rs index d5ec972..1851cfe 100644 --- a/crates/jacquard-api/src/tools_ozone/set/delete_set.rs +++ b/crates/jacquard-api/src/tools_ozone/set/delete_set.rs @@ -1,10 +1,17 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DeleteSetInput<'a> { + ///Name of the set to delete #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -27,6 +34,7 @@ pub enum DeleteSetError<'a> { #[serde(rename = "SetNotFound")] SetNotFound(std::option::Option), } + impl std::fmt::Display for DeleteSetError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -37,7 +45,7 @@ impl std::fmt::Display for DeleteSetError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/delete_values.rs b/crates/jacquard-api/src/tools_ozone/set/delete_values.rs index 03af995..3a3eb4e 100644 --- a/crates/jacquard-api/src/tools_ozone/set/delete_values.rs +++ b/crates/jacquard-api/src/tools_ozone/set/delete_values.rs @@ -1,12 +1,20 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DeleteValuesInput<'a> { + ///Name of the set to delete values from #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, + ///Array of string values to delete from the set #[serde(borrow)] pub values: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -25,6 +33,7 @@ pub enum DeleteValuesError<'a> { #[serde(rename = "SetNotFound")] SetNotFound(std::option::Option), } + impl std::fmt::Display for DeleteValuesError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -35,7 +44,7 @@ impl std::fmt::Display for DeleteValuesError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/get_values.rs b/crates/jacquard-api/src/tools_ozone/set/get_values.rs index ebc2f4f..28cc7b9 100644 --- a/crates/jacquard-api/src/tools_ozone/set/get_values.rs +++ b/crates/jacquard-api/src/tools_ozone/set/get_values.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GetValuesParams<'a> { @@ -9,6 +14,7 @@ pub struct GetValuesParams<'a> { #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -21,6 +27,7 @@ pub struct GetValuesOutput<'a> { #[serde(borrow)] pub values: Vec>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -39,6 +46,7 @@ pub enum GetValuesError<'a> { #[serde(rename = "SetNotFound")] SetNotFound(std::option::Option), } + impl std::fmt::Display for GetValuesError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -49,7 +57,7 @@ impl std::fmt::Display for GetValuesError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/query_sets.rs b/crates/jacquard-api/src/tools_ozone/set/query_sets.rs index 1da100a..ed59b17 100644 --- a/crates/jacquard-api/src/tools_ozone/set/query_sets.rs +++ b/crates/jacquard-api/src/tools_ozone/set/query_sets.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct QuerySetsParams<'a> { @@ -16,6 +21,7 @@ pub struct QuerySetsParams<'a> { #[serde(borrow)] pub sort_direction: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,4 +31,4 @@ pub struct QuerySetsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub sets: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/set/upsert_set.rs b/crates/jacquard-api/src/tools_ozone/set/upsert_set.rs index 3136df2..758bcb3 100644 --- a/crates/jacquard-api/src/tools_ozone/set/upsert_set.rs +++ b/crates/jacquard-api/src/tools_ozone/set/upsert_set.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,6 +11,7 @@ pub struct UpsertSetInput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::set::Set<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -13,4 +19,4 @@ pub struct UpsertSetOutput<'a> { #[serde(flatten)] #[serde(borrow)] pub value: crate::tools_ozone::set::SetView<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/setting.rs b/crates/jacquard-api/src/tools_ozone/setting.rs index 11e17c9..d6875ef 100644 --- a/crates/jacquard-api/src/tools_ozone/setting.rs +++ b/crates/jacquard-api/src/tools_ozone/setting.rs @@ -1,3 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod list_options; +pub mod remove_options; +pub mod upsert_option; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,7 +33,4 @@ pub struct Option<'a> { pub updated_at: std::option::Option, #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, -} -pub mod list_options; -pub mod remove_options; -pub mod upsert_option; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/setting/list_options.rs b/crates/jacquard-api/src/tools_ozone/setting/list_options.rs index b2b912b..a3426b2 100644 --- a/crates/jacquard-api/src/tools_ozone/setting/list_options.rs +++ b/crates/jacquard-api/src/tools_ozone/setting/list_options.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListOptionsParams<'a> { @@ -16,6 +21,7 @@ pub struct ListOptionsParams<'a> { #[serde(borrow)] pub scope: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -25,4 +31,4 @@ pub struct ListOptionsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub options: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/setting/remove_options.rs b/crates/jacquard-api/src/tools_ozone/setting/remove_options.rs index ab6a9fd..f05e9bc 100644 --- a/crates/jacquard-api/src/tools_ozone/setting/remove_options.rs +++ b/crates/jacquard-api/src/tools_ozone/setting/remove_options.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,7 +12,8 @@ pub struct RemoveOptionsInput<'a> { #[serde(borrow)] pub scope: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -pub struct RemoveOptionsOutput<'a> {} +pub struct RemoveOptionsOutput<'a> {} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs b/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs index 380bebb..64d1b45 100644 --- a/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs +++ b/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -15,10 +20,11 @@ pub struct UpsertOptionInput<'a> { #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpsertOptionOutput<'a> { #[serde(borrow)] pub option: crate::tools_ozone::setting::Option<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/signature.rs b/crates/jacquard-api/src/tools_ozone/signature.rs index 77b1ec8..261ca3b 100644 --- a/crates/jacquard-api/src/tools_ozone/signature.rs +++ b/crates/jacquard-api/src/tools_ozone/signature.rs @@ -1,3 +1,12 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod find_correlation; +pub mod find_related_accounts; +pub mod search_accounts; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -6,7 +15,4 @@ pub struct SigDetail<'a> { pub property: jacquard_common::CowStr<'a>, #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, -} -pub mod find_correlation; -pub mod find_related_accounts; -pub mod search_accounts; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/signature/find_correlation.rs b/crates/jacquard-api/src/tools_ozone/signature/find_correlation.rs index 12f3316..890c25d 100644 --- a/crates/jacquard-api/src/tools_ozone/signature/find_correlation.rs +++ b/crates/jacquard-api/src/tools_ozone/signature/find_correlation.rs @@ -1,13 +1,19 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct FindCorrelationParams<'a> { #[serde(borrow)] pub dids: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct FindCorrelationOutput<'a> { #[serde(borrow)] pub details: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/signature/find_related_accounts.rs b/crates/jacquard-api/src/tools_ozone/signature/find_related_accounts.rs index 7874fb2..660a50b 100644 --- a/crates/jacquard-api/src/tools_ozone/signature/find_related_accounts.rs +++ b/crates/jacquard-api/src/tools_ozone/signature/find_related_accounts.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct FindRelatedAccountsParams<'a> { @@ -9,6 +14,7 @@ pub struct FindRelatedAccountsParams<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -19,6 +25,7 @@ pub struct FindRelatedAccountsOutput<'a> { #[serde(borrow)] pub cursor: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -30,4 +37,4 @@ pub struct RelatedAccount<'a> { pub similarities: std::option::Option< Vec>, >, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/signature/search_accounts.rs b/crates/jacquard-api/src/tools_ozone/signature/search_accounts.rs index c068769..9138b15 100644 --- a/crates/jacquard-api/src/tools_ozone/signature/search_accounts.rs +++ b/crates/jacquard-api/src/tools_ozone/signature/search_accounts.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SearchAccountsParams<'a> { @@ -9,6 +14,7 @@ pub struct SearchAccountsParams<'a> { #[serde(borrow)] pub values: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,4 +24,4 @@ pub struct SearchAccountsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/team.rs b/crates/jacquard-api/src/tools_ozone/team.rs index 49c6ad9..34ce87f 100644 --- a/crates/jacquard-api/src/tools_ozone/team.rs +++ b/crates/jacquard-api/src/tools_ozone/team.rs @@ -1,3 +1,13 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod add_member; +pub mod delete_member; +pub mod list_members; +pub mod update_member; + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,8 +28,4 @@ pub struct Member<'a> { pub role: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub updated_at: std::option::Option, -} -pub mod add_member; -pub mod delete_member; -pub mod list_members; -pub mod update_member; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/team/add_member.rs b/crates/jacquard-api/src/tools_ozone/team/add_member.rs index 72c51ec..59bba8b 100644 --- a/crates/jacquard-api/src/tools_ozone/team/add_member.rs +++ b/crates/jacquard-api/src/tools_ozone/team/add_member.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -7,6 +12,7 @@ pub struct AddMemberInput<'a> { #[serde(borrow)] pub role: jacquard_common::CowStr<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -15,6 +21,7 @@ pub struct AddMemberOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::team::Member<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -33,6 +40,7 @@ pub enum AddMemberError<'a> { #[serde(rename = "MemberAlreadyExists")] MemberAlreadyExists(std::option::Option), } + impl std::fmt::Display for AddMemberError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -43,7 +51,7 @@ impl std::fmt::Display for AddMemberError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/team/delete_member.rs b/crates/jacquard-api/src/tools_ozone/team/delete_member.rs index cf7b7de..585d3eb 100644 --- a/crates/jacquard-api/src/tools_ozone/team/delete_member.rs +++ b/crates/jacquard-api/src/tools_ozone/team/delete_member.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -5,6 +10,7 @@ pub struct DeleteMemberInput<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -26,6 +32,7 @@ pub enum DeleteMemberError<'a> { #[serde(rename = "CannotDeleteSelf")] CannotDeleteSelf(std::option::Option), } + impl std::fmt::Display for DeleteMemberError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -43,7 +50,7 @@ impl std::fmt::Display for DeleteMemberError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/team/list_members.rs b/crates/jacquard-api/src/tools_ozone/team/list_members.rs index 7511070..21155eb 100644 --- a/crates/jacquard-api/src/tools_ozone/team/list_members.rs +++ b/crates/jacquard-api/src/tools_ozone/team/list_members.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListMembersParams<'a> { @@ -15,6 +20,7 @@ pub struct ListMembersParams<'a> { #[serde(borrow)] pub roles: std::option::Option>>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,4 +30,4 @@ pub struct ListMembersOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub members: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/team/update_member.rs b/crates/jacquard-api/src/tools_ozone/team/update_member.rs index 443095f..1a829b6 100644 --- a/crates/jacquard-api/src/tools_ozone/team/update_member.rs +++ b/crates/jacquard-api/src/tools_ozone/team/update_member.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -10,6 +15,7 @@ pub struct UpdateMemberInput<'a> { #[serde(borrow)] pub role: std::option::Option>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -18,6 +24,7 @@ pub struct UpdateMemberOutput<'a> { #[serde(borrow)] pub value: crate::tools_ozone::team::Member<'a>, } + #[jacquard_derive::open_union] #[derive( serde::Serialize, @@ -36,6 +43,7 @@ pub enum UpdateMemberError<'a> { #[serde(rename = "MemberNotFound")] MemberNotFound(std::option::Option), } + impl std::fmt::Display for UpdateMemberError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -46,7 +54,7 @@ impl std::fmt::Display for UpdateMemberError<'_> { } Ok(()) } - Self::Unknown(_) => write!(f, "Unknown error"), + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/verification.rs b/crates/jacquard-api/src/tools_ozone/verification.rs index a8b154b..1bfaee4 100644 --- a/crates/jacquard-api/src/tools_ozone/verification.rs +++ b/crates/jacquard-api/src/tools_ozone/verification.rs @@ -1,13 +1,26 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod grant_verifications; +pub mod list_verifications; +pub mod revoke_verifications; + ///Verification data for the associated subject. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct VerificationView<'a> { + ///Timestamp when the verification was created. pub created_at: jacquard_common::types::string::Datetime, + ///Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. #[serde(borrow)] pub display_name: jacquard_common::CowStr<'a>, + ///Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, + ///The user who issued this verification. #[serde(borrow)] pub issuer: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -16,14 +29,18 @@ pub struct VerificationView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub issuer_repo: std::option::Option>, + ///Describes the reason for revocation, also indicating that the verification is no longer valid. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub revoke_reason: std::option::Option>, + ///Timestamp when the verification was revoked. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub revoked_at: std::option::Option, + ///The user who revoked this verification. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub revoked_by: std::option::Option>, + ///The subject of the verification. #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -32,9 +49,11 @@ pub struct VerificationView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_repo: std::option::Option>, + ///The AT-URI of the verification record. #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -50,6 +69,7 @@ pub enum VerificationViewRecordIssuerRepo<'a> { #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] DefsRepoViewNotFound(Box>), } + #[jacquard_derive::open_union] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -64,7 +84,4 @@ pub enum VerificationViewRecordSubjectRepo<'a> { DefsRepoViewDetail(Box>), #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] DefsRepoViewNotFound(Box>), -} -pub mod grant_verifications; -pub mod list_verifications; -pub mod revoke_verifications; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs b/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs index 49612f3..4be7b0b 100644 --- a/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs +++ b/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs @@ -1,20 +1,30 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + ///Error object for failed verifications. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GrantError<'a> { + ///Error message describing the reason for failure. #[serde(borrow)] pub error: jacquard_common::CowStr<'a>, + ///The did of the subject being verified #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GrantVerificationsInput<'a> { + ///Array of verification requests to process #[serde(borrow)] pub verifications: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -24,16 +34,21 @@ pub struct GrantVerificationsOutput<'a> { #[serde(borrow)] pub verifications: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct VerificationInput<'a> { + ///Timestamp for verification record. Defaults to current time when not specified. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: std::option::Option, + ///Display name of the subject the verification applies to at the moment of verifying. #[serde(borrow)] pub display_name: jacquard_common::CowStr<'a>, + ///Handle of the subject the verification applies to at the moment of verifying. #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, + ///The did of the subject being verified #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/verification/list_verifications.rs b/crates/jacquard-api/src/tools_ozone/verification/list_verifications.rs index cc342cb..6ff44ce 100644 --- a/crates/jacquard-api/src/tools_ozone/verification/list_verifications.rs +++ b/crates/jacquard-api/src/tools_ozone/verification/list_verifications.rs @@ -1,3 +1,8 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListVerificationsParams<'a> { @@ -22,6 +27,7 @@ pub struct ListVerificationsParams<'a> { #[serde(borrow)] pub subjects: std::option::Option>>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] @@ -31,4 +37,4 @@ pub struct ListVerificationsOutput<'a> { pub cursor: std::option::Option>, #[serde(borrow)] pub verifications: Vec>, -} +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/verification/revoke_verifications.rs b/crates/jacquard-api/src/tools_ozone/verification/revoke_verifications.rs index b6c79fb..f85431c 100644 --- a/crates/jacquard-api/src/tools_ozone/verification/revoke_verifications.rs +++ b/crates/jacquard-api/src/tools_ozone/verification/revoke_verifications.rs @@ -1,29 +1,42 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RevokeVerificationsInput<'a> { + ///Reason for revoking the verification. This is optional and can be omitted if not needed. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub revoke_reason: std::option::Option>, + ///Array of verification record uris to revoke #[serde(borrow)] pub uris: Vec>, } + #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RevokeVerificationsOutput<'a> { + ///List of verification uris that couldn't be revoked, including failure reasons #[serde(borrow)] pub failed_revocations: Vec>, + ///List of verification uris successfully revoked #[serde(borrow)] pub revoked_verifications: Vec>, } + ///Error object for failed revocations #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RevokeError<'a> { + ///Description of the error that occurred during revocation. #[serde(borrow)] pub error: jacquard_common::CowStr<'a>, + ///The AT-URI of the verification record that failed to revoke. #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, -} +} \ No newline at end of file diff --git a/crates/jacquard-lexicon/Cargo.toml b/crates/jacquard-lexicon/Cargo.toml index 952cb4e..65984f7 100644 --- a/crates/jacquard-lexicon/Cargo.toml +++ b/crates/jacquard-lexicon/Cargo.toml @@ -11,7 +11,12 @@ documentation.workspace = true exclude.workspace = true description.workspace = true +[[bin]] +name = "jacquard-codegen" +path = "src/bin/codegen.rs" + [dependencies] +clap = { workspace = true } heck = "0.5.0" itertools = "0.14.0" jacquard-common = { version = "0.1.0", path = "../jacquard-common" } diff --git a/crates/jacquard-lexicon/src/bin/codegen.rs b/crates/jacquard-lexicon/src/bin/codegen.rs new file mode 100644 index 0000000..3d598af --- /dev/null +++ b/crates/jacquard-lexicon/src/bin/codegen.rs @@ -0,0 +1,40 @@ +use clap::Parser; +use jacquard_lexicon::codegen::CodeGenerator; +use jacquard_lexicon::corpus::LexiconCorpus; +use std::path::PathBuf; + +#[derive(Parser, Debug)] +#[command(author, version, about = "Generate Rust code from Lexicon schemas")] +struct Args { + /// Directory containing Lexicon JSON files + #[arg(short = 'i', long)] + input: PathBuf, + + /// Output directory for generated Rust code + #[arg(short = 'o', long)] + output: PathBuf, + + /// Root module name (default: "crate") + #[arg(short = 'r', long, default_value = "crate")] + root_module: String, +} + +fn main() -> miette::Result<()> { + let args = Args::parse(); + + println!("Loading lexicons from {:?}...", args.input); + let corpus = LexiconCorpus::load_from_dir(&args.input)?; + + println!( + "Loaded {} lexicon documents", + corpus.iter().count() + ); + + println!("Generating code..."); + let codegen = CodeGenerator::new(&corpus, args.root_module); + codegen.write_to_disk(&args.output)?; + + println!("✨ Generated code to {:?}", args.output); + + Ok(()) +} diff --git a/crates/jacquard-lexicon/src/codegen.rs b/crates/jacquard-lexicon/src/codegen.rs index cbfc7b0..41f9924 100644 --- a/crates/jacquard-lexicon/src/codegen.rs +++ b/crates/jacquard-lexicon/src/codegen.rs @@ -1,10 +1,9 @@ use crate::corpus::LexiconCorpus; use crate::error::{CodegenError, Result}; use crate::lexicon::{ - LexArrayItem, LexBlob, LexBoolean, LexBytes, LexCidLink, LexInteger, LexObject, - LexObjectProperty, LexRecord, LexRef, LexRefUnion, LexString, LexStringFormat, LexUnknown, - LexUserType, LexXrpcBody, LexXrpcBodySchema, LexXrpcError, LexXrpcParameters, LexXrpcProcedure, - LexXrpcQuery, LexXrpcSubscription, LexXrpcSubscriptionMessageSchema, + LexArrayItem, LexInteger, LexObject, LexObjectProperty, LexRecord, LexString, LexStringFormat, + LexUserType, LexXrpcBody, LexXrpcBodySchema, LexXrpcError, LexXrpcProcedure, LexXrpcQuery, + LexXrpcSubscription, LexXrpcSubscriptionMessageSchema, }; use heck::{ToPascalCase, ToSnakeCase}; use proc_macro2::TokenStream; @@ -273,6 +272,21 @@ impl<'c> CodeGenerator<'c> { quote! { std::option::Option<#rust_type> } }; + // Extract description from field type + let description = match field_type { + LexObjectProperty::Ref(r) => r.description.as_ref(), + LexObjectProperty::Union(u) => u.description.as_ref(), + LexObjectProperty::Bytes(b) => b.description.as_ref(), + LexObjectProperty::CidLink(c) => c.description.as_ref(), + LexObjectProperty::Array(a) => a.description.as_ref(), + LexObjectProperty::Blob(b) => b.description.as_ref(), + LexObjectProperty::Boolean(b) => b.description.as_ref(), + LexObjectProperty::Integer(i) => i.description.as_ref(), + LexObjectProperty::String(s) => s.description.as_ref(), + LexObjectProperty::Unknown(u) => u.description.as_ref(), + }; + let doc = self.generate_doc_comment(description); + let mut attrs = Vec::new(); if !is_required { @@ -285,6 +299,7 @@ impl<'c> CodeGenerator<'c> { } Ok(quote! { + #doc #(#attrs)* pub #field_ident: #rust_type, }) @@ -418,7 +433,15 @@ impl<'c> CodeGenerator<'c> { let item_type = self.array_item_to_rust_type(nsid, &array.items)?; Ok(quote! { Vec<#item_type> }) } - LexObjectProperty::Ref(ref_type) => self.ref_to_rust_type(&ref_type.r#ref), + LexObjectProperty::Ref(ref_type) => { + // Handle local refs (starting with #) by prepending the current NSID + let ref_str = if ref_type.r#ref.starts_with('#') { + format!("{}{}", nsid, ref_type.r#ref) + } else { + ref_type.r#ref.to_string() + }; + self.ref_to_rust_type(&ref_str) + } LexObjectProperty::Union(_union) => { // Generate unique union type name: StatusView + embed -> StatusViewRecordEmbed let union_name = @@ -430,7 +453,7 @@ impl<'c> CodeGenerator<'c> { } /// Convert array item to Rust type - fn array_item_to_rust_type(&self, _nsid: &str, item: &LexArrayItem) -> Result { + fn array_item_to_rust_type(&self, nsid: &str, item: &LexArrayItem) -> Result { match item { LexArrayItem::Boolean(_) => Ok(quote! { bool }), LexArrayItem::Integer(_) => Ok(quote! { i64 }), @@ -439,7 +462,15 @@ impl<'c> CodeGenerator<'c> { LexArrayItem::CidLink(_) => Ok(quote! { jacquard_common::types::cid::CidLink<'a> }), LexArrayItem::Blob(_) => Ok(quote! { jacquard_common::types::blob::Blob<'a> }), LexArrayItem::Unknown(_) => Ok(quote! { jacquard_common::types::value::Data<'a> }), - LexArrayItem::Ref(ref_type) => self.ref_to_rust_type(&ref_type.r#ref), + LexArrayItem::Ref(ref_type) => { + // Handle local refs (starting with #) by prepending the current NSID + let ref_str = if ref_type.r#ref.starts_with('#') { + format!("{}{}", nsid, ref_type.r#ref) + } else { + ref_type.r#ref.to_string() + }; + self.ref_to_rust_type(&ref_str) + } LexArrayItem::Union(_) => { // For now, use Data Ok(quote! { jacquard_common::types::value::Data<'a> }) @@ -835,17 +866,22 @@ impl<'c> CodeGenerator<'c> { } /// Generate all code for the corpus, organized by file + /// Returns a map of file paths to (tokens, optional NSID) pub fn generate_all( &self, - ) -> Result> { + ) -> Result)>> { use std::collections::BTreeMap; let mut file_contents: BTreeMap> = BTreeMap::new(); + let mut file_nsids: BTreeMap = BTreeMap::new(); // Generate code for all lexicons for (nsid, doc) in self.corpus.iter() { let file_path = self.nsid_to_file_path(nsid.as_ref()); + // Track which NSID this file is for + file_nsids.insert(file_path.clone(), nsid.to_string()); + for (def_name, def) in &doc.defs { let tokens = self.generate_def(nsid.as_ref(), def_name.as_ref(), def)?; file_contents @@ -858,7 +894,8 @@ impl<'c> CodeGenerator<'c> { // Combine all tokens for each file let mut result = BTreeMap::new(); for (path, tokens_vec) in file_contents { - result.insert(path, quote! { #(#tokens_vec)* }); + let nsid = file_nsids.get(&path).cloned(); + result.insert(path, (quote! { #(#tokens_vec)* }, nsid)); } Ok(result) @@ -867,9 +904,9 @@ impl<'c> CodeGenerator<'c> { /// Generate parent module files with pub mod declarations pub fn generate_module_tree( &self, - file_map: &std::collections::BTreeMap, - defs_only: &std::collections::BTreeMap, - ) -> std::collections::BTreeMap { + file_map: &std::collections::BTreeMap)>, + defs_only: &std::collections::BTreeMap)>, + ) -> std::collections::BTreeMap)> { use std::collections::{BTreeMap, BTreeSet}; // Track what modules each directory needs to declare @@ -929,11 +966,14 @@ impl<'c> CodeGenerator<'c> { // If this file already exists in defs_only (e.g., from defs), merge the content let module_tokens = quote! { #(#mods)* }; - if let Some(existing) = defs_only.get(&mod_file_path) { - // Combine existing defs content with module declarations - result.insert(mod_file_path, quote! { #existing #module_tokens }); + if let Some((existing_tokens, nsid)) = defs_only.get(&mod_file_path) { + // Put module declarations FIRST, then existing defs content + result.insert( + mod_file_path, + (quote! { #module_tokens #existing_tokens }, nsid.clone()), + ); } else { - result.insert(mod_file_path, module_tokens); + result.insert(mod_file_path, (module_tokens, None)); } } @@ -963,7 +1003,7 @@ impl<'c> CodeGenerator<'c> { } // Write to disk - for (path, tokens) in all_files { + for (path, (tokens, nsid)) in all_files { let full_path = output_dir.join(&path); // Create parent directories @@ -982,7 +1022,41 @@ impl<'c> CodeGenerator<'c> { ), source: None, })?; - let formatted = prettyplease::unparse(&file); + let mut formatted = prettyplease::unparse(&file); + + // Add blank lines between top-level items for better readability + let lines: Vec<&str> = formatted.lines().collect(); + let mut result_lines = Vec::new(); + + for (i, line) in lines.iter().enumerate() { + result_lines.push(*line); + + // Add blank line after closing braces that are at column 0 (top-level items) + if *line == "}" && i + 1 < lines.len() && !lines[i + 1].is_empty() { + result_lines.push(""); + } + + // Add blank line after last pub mod declaration before structs/enums + if line.starts_with("pub mod ") && i + 1 < lines.len() { + let next_line = lines[i + 1]; + if !next_line.starts_with("pub mod ") && !next_line.is_empty() { + result_lines.push(""); + } + } + } + + formatted = result_lines.join("\n"); + + // Add header comment + let header = if let Some(nsid) = nsid { + format!( + "// @generated by jacquard-lexicon. DO NOT EDIT.\n//\n// Lexicon: {}\n//\n// This file was automatically generated from Lexicon schemas.\n// Any manual changes will be overwritten on the next regeneration.\n\n", + nsid + ) + } else { + "// @generated by jacquard-lexicon. DO NOT EDIT.\n//\n// This file was automatically generated from Lexicon schemas.\n// Any manual changes will be overwritten on the next regeneration.\n\n".to_string() + }; + formatted = format!("{}{}", header, formatted); // Write file std::fs::write(&full_path, formatted).map_err(|e| CodegenError::Other { diff --git a/crates/jacquard-lexicon/src/fs.rs b/crates/jacquard-lexicon/src/fs.rs index cc392af..4b96768 100644 --- a/crates/jacquard-lexicon/src/fs.rs +++ b/crates/jacquard-lexicon/src/fs.rs @@ -28,9 +28,3 @@ pub(crate) fn find_schemas(path: &Path) -> Result>> { })?; Ok(results) } - -pub(crate) fn find_dirs(path: &Path) -> Result>> { - let mut results = Vec::new(); - walk(path, &mut results, &mut |path| path.is_dir())?; - Ok(results) -}