diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9aa537a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "atproto"] + path = atproto + url = https://github.com/bluesky-social/atproto +[submodule "tangled/core"] + path = tangled/core + url = https://tangled.sh/@tangled.sh/core diff --git a/Cargo.lock b/Cargo.lock index ea8b549..4d7ca45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3440,11 +3440,19 @@ dependencies = [ name = "weaver-workspace-hack" version = "0.1.0" dependencies = [ + "data-encoding", + "futures-channel", + "futures-core", + "idna", + "memchr", + "percent-encoding", "proc-macro2", "quote", + "scopeguard", "smallvec", "syn", "tokio", + "tracing", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 53ab7c0..67bf32b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "2" # rebuilt if the other package's sources change. members = ["crates/*"] -default-members = ["crates/weaver-cli"] +#default-members = ["crates/weaver-cli"] [workspace.package] @@ -35,8 +35,10 @@ syntect = "5.2.0" jane-eyre = "0.6.12" n0-future = "=0.1.2" tracing = { version = "0.1.41", default-features = false, features = ["std"] } -lexicon_cid = { package = "cid", version = "0.10.1", features = ["serde-codec"] } -markdown-weaver = { git = "https://github.com/rsform/markdown-weaver"} +lexicon_cid = { package = "cid", version = "0.10.1", features = [ + "serde-codec", +] } +markdown-weaver = { git = "https://github.com/rsform/markdown-weaver" } esquema-codegen = { git = "https://github.com/fatfingers23/esquema.git", branch = "main" } atrium-lex = { git = "https://github.com/sugyan/atrium.git", rev = "f162f815a04b5ecb0421b390d521c883c41d5f75" } diff --git a/atproto b/atproto new file mode 160000 index 0000000..efc64ba --- /dev/null +++ b/atproto @@ -0,0 +1 @@ +Subproject commit efc64ba92511933c2100b45c0e7f4bcae9199240 diff --git a/crates/weaver-common/Cargo.toml b/crates/weaver-common/Cargo.toml index 5ee3f14..b516c59 100644 --- a/crates/weaver-common/Cargo.toml +++ b/crates/weaver-common/Cargo.toml @@ -21,10 +21,19 @@ atrium-lex = { workspace = true } merde = { workspace = true, features = ["yaml"] } serde = { workspace = true } serde_json = { version = "1.0.140", features = ["preserve_order", "raw_value"] } -serde_ipld_dagcbor = { version = "0.6.1" ,features = ["codec"]} +serde_ipld_dagcbor = { version = "0.6.1", features = ["codec"] } serde_cbor = "0.11.2" -minijinja = { workspace = true, features = ["builtins", "debug", "deserialization", "macros", "multi_template", "adjacent_loop_items", "std_collections", "serde"]} +minijinja = { workspace = true, features = [ + "builtins", + "debug", + "deserialization", + "macros", + "multi_template", + "adjacent_loop_items", + "std_collections", + "serde", +] } miette = { workspace = true, features = ["fancy"] } diff --git a/crates/weaver-common/src/error.rs b/crates/weaver-common/src/error.rs index feaa25d..9bec8af 100644 --- a/crates/weaver-common/src/error.rs +++ b/crates/weaver-common/src/error.rs @@ -127,7 +127,7 @@ impl ParseError { let (line, col) = offset_to_line_col(self.err_location.offset(), &self.src); let len = self.err_location.len(); let location = - SourceSpan::new(SourceOffset::from_location(&src.inner(), line, col), len); + SourceSpan::new(SourceOffset::from_location(src.inner(), line, col), len); Self { kind: self.kind, src, @@ -173,7 +173,7 @@ impl From for ParseError { fn from(err: serde_json::Error) -> Self { let line = err.line(); let column = err.column(); - let location = SourceSpan::new(SourceOffset::from_location(&"", line, column), 0); + let location = SourceSpan::new(SourceOffset::from_location("", line, column), 0); Self { kind: ParseErrorKind::SerdeError(SerDeError::SDJson(err)), src: NamedSource::new(Cow::Borrowed("json"), Cow::Borrowed("")), diff --git a/crates/weaver-common/src/lexicons/app.rs b/crates/weaver-common/src/lexicons/app.rs new file mode 100644 index 0000000..c8d18b3 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app` namespace. +pub mod bsky; diff --git a/crates/weaver-common/src/lexicons/app/bsky.rs b/crates/weaver-common/src/lexicons/app/bsky.rs new file mode 100644 index 0000000..f5d6a44 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky` namespace. +pub mod actor; +pub mod embed; +pub mod feed; +pub mod graph; +pub mod labeler; +pub mod notification; +pub mod richtext; +pub mod unspecced; +pub mod video; diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor.rs b/crates/weaver-common/src/lexicons/app/bsky/actor.rs new file mode 100644 index 0000000..17d8e0f --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor.rs @@ -0,0 +1,12 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor` namespace. +pub mod defs; +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; diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/defs.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/defs.rs new file mode 100644 index 0000000..d4554d7 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/defs.rs @@ -0,0 +1,455 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AdultContentPrefData { + pub enabled: bool, +} +pub type AdultContentPref = atrium_api::types::Object; +///If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct BskyAppProgressGuideData { + pub guide: String, +} +pub type BskyAppProgressGuide = atrium_api::types::Object; +///A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct BskyAppStatePrefData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub active_progress_guide: core::option::Option, + ///Storage for NUXs the user has encountered. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub nuxs: core::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 = "core::option::Option::is_none")] + pub queued_nudges: core::option::Option>, +} +pub type BskyAppStatePref = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ContentLabelPrefData { + pub label: String, + ///Which labeler does this preference apply to? If undefined, applies globally. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labeler_did: core::option::Option, + pub visibility: String, +} +pub type ContentLabelPref = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct FeedViewPrefData { + ///The URI of the feed, or an identifier which describes the feed. + pub feed: String, + ///Hide quote posts in the feed. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hide_quote_posts: core::option::Option, + ///Hide replies in the feed. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hide_replies: core::option::Option, + ///Hide replies in the feed if they do not have this number of likes. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hide_replies_by_like_count: core::option::Option, + ///Hide replies in the feed if they are not by followed users. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hide_replies_by_unfollowed: core::option::Option, + ///Hide reposts in the feed. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hide_reposts: core::option::Option, +} +pub type FeedViewPref = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct HiddenPostsPrefData { + ///A list of URIs of posts the account owner has hidden. + pub items: Vec, +} +pub type HiddenPostsPref = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InterestsPrefData { + ///A list of tags which describe the account owner's interests gathered during onboarding. + pub tags: Vec, +} +pub type InterestsPref = atrium_api::types::Object; +///The subject's followers whom you also follow +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct KnownFollowersData { + pub count: i64, + pub followers: Vec, +} +pub type KnownFollowers = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelerPrefItemData { + pub did: atrium_api::types::string::Did, +} +pub type LabelerPrefItem = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelersPrefData { + pub labelers: Vec, +} +pub type LabelersPref = atrium_api::types::Object; +///A word that the account owner has muted. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MutedWordData { + ///Groups of users to apply the muted word to. If undefined, applies to all users. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub actor_target: core::option::Option, + ///The date and time at which the muted word will expire and no longer be applied. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub expires_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub id: core::option::Option, + ///The intended targets of the muted word. + pub targets: Vec, + ///The muted word itself. + pub value: String, +} +pub type MutedWord = atrium_api::types::Object; +pub type MutedWordTarget = String; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MutedWordsPrefData { + ///A list of words the account owner has muted. + pub items: Vec, +} +pub type MutedWordsPref = atrium_api::types::Object; +///A new user experiences (NUX) storage object +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct NuxData { + pub completed: bool, + ///Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub data: core::option::Option, + ///The date and time at which the NUX will expire and should be considered completed. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub expires_at: core::option::Option, + pub id: String, +} +pub type Nux = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct PersonalDetailsPrefData { + ///The birth date of account owner. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub birth_date: core::option::Option, +} +pub type PersonalDetailsPref = atrium_api::types::Object; +///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. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct PostInteractionSettingsPrefData { + ///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 = "core::option::Option::is_none")] + pub postgate_embedding_rules: core::option::Option< + Vec< + atrium_api::types::Union< + PostInteractionSettingsPrefPostgateEmbeddingRulesItem, + >, + >, + >, + ///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 = "core::option::Option::is_none")] + pub threadgate_allow_rules: core::option::Option< + Vec< + atrium_api::types::Union, + >, + >, +} +pub type PostInteractionSettingsPref = atrium_api::types::Object< + PostInteractionSettingsPrefData, +>; +pub type Preferences = Vec>; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProfileAssociatedData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub chat: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub feedgens: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labeler: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lists: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub starter_packs: core::option::Option, +} +pub type ProfileAssociated = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProfileAssociatedChatData { + pub allow_incoming: String, +} +pub type ProfileAssociatedChat = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProfileViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub associated: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, + pub handle: atrium_api::types::string::Handle, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub indexed_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verification: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type ProfileView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProfileViewBasicData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub associated: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, + pub handle: atrium_api::types::string::Handle, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verification: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type ProfileViewBasic = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProfileViewDetailedData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub associated: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub banner: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub followers_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub follows_count: core::option::Option, + pub handle: atrium_api::types::string::Handle, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub indexed_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub joined_via_starter_pack: core::option::Option< + crate::app::bsky::graph::defs::StarterPackViewBasic, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub pinned_post: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub posts_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verification: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type ProfileViewDetailed = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SavedFeedData { + pub id: String, + pub pinned: bool, + pub r#type: String, + pub value: String, +} +pub type SavedFeed = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SavedFeedsPrefData { + pub pinned: Vec, + pub saved: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub timeline_index: core::option::Option, +} +pub type SavedFeedsPref = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SavedFeedsPrefV2Data { + pub items: Vec, +} +pub type SavedFeedsPrefV2 = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct StatusViewData { + ///An optional embed associated with the status. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embed: core::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 = "core::option::Option::is_none")] + pub expires_at: core::option::Option, + ///True if the status is not expired, false if it is expired. Only present if expiration was set. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub is_active: core::option::Option, + pub record: atrium_api::types::Unknown, + ///The status for the account. + pub status: String, +} +pub type StatusView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ThreadViewPrefData { + ///Show followed users at the top of all replies. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub prioritize_followed_users: core::option::Option, + ///Sorting mode for threads. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort: core::option::Option, +} +pub type ThreadViewPref = atrium_api::types::Object; +///Preferences for how verified accounts appear in the app. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct VerificationPrefsData { + ///Hide the blue check badges for verified accounts and trusted verifiers. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hide_badges: core::option::Option, +} +pub type VerificationPrefs = atrium_api::types::Object; +///Represents the verification information about the user this object is attached to. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct VerificationStateData { + ///The user's status as a trusted verifier. + pub trusted_verifier_status: String, + ///All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. + pub verifications: Vec, + ///The user's status as a verified account. + pub verified_status: String, +} +pub type VerificationState = atrium_api::types::Object; +///An individual verification for an associated subject. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct VerificationViewData { + ///Timestamp when the verification was created. + pub created_at: atrium_api::types::string::Datetime, + ///True if the verification passes validation, otherwise false. + pub is_valid: bool, + ///The user who issued this verification. + pub issuer: atrium_api::types::string::Did, + ///The AT-URI of the verification record. + pub uri: String, +} +pub type VerificationView = atrium_api::types::Object; +///Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewerStateData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub blocked_by: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub blocking: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub blocking_by_list: core::option::Option< + crate::app::bsky::graph::defs::ListViewBasic, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub followed_by: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub following: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub known_followers: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub muted: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub muted_by_list: core::option::Option< + crate::app::bsky::graph::defs::ListViewBasic, + >, +} +pub type ViewerState = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum PostInteractionSettingsPrefPostgateEmbeddingRulesItem { + #[serde(rename = "app.bsky.feed.postgate#disableRule")] + AppBskyFeedPostgateDisableRule(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum PostInteractionSettingsPrefThreadgateAllowRulesItem { + #[serde(rename = "app.bsky.feed.threadgate#mentionRule")] + AppBskyFeedThreadgateMentionRule( + Box, + ), + #[serde(rename = "app.bsky.feed.threadgate#followerRule")] + AppBskyFeedThreadgateFollowerRule( + Box, + ), + #[serde(rename = "app.bsky.feed.threadgate#followingRule")] + AppBskyFeedThreadgateFollowingRule( + Box, + ), + #[serde(rename = "app.bsky.feed.threadgate#listRule")] + AppBskyFeedThreadgateListRule(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum PreferencesItem { + #[serde(rename = "app.bsky.actor.defs#adultContentPref")] + AdultContentPref(Box), + #[serde(rename = "app.bsky.actor.defs#contentLabelPref")] + ContentLabelPref(Box), + #[serde(rename = "app.bsky.actor.defs#savedFeedsPref")] + SavedFeedsPref(Box), + #[serde(rename = "app.bsky.actor.defs#savedFeedsPrefV2")] + SavedFeedsPrefV2(Box), + #[serde(rename = "app.bsky.actor.defs#personalDetailsPref")] + PersonalDetailsPref(Box), + #[serde(rename = "app.bsky.actor.defs#feedViewPref")] + FeedViewPref(Box), + #[serde(rename = "app.bsky.actor.defs#threadViewPref")] + ThreadViewPref(Box), + #[serde(rename = "app.bsky.actor.defs#interestsPref")] + InterestsPref(Box), + #[serde(rename = "app.bsky.actor.defs#mutedWordsPref")] + MutedWordsPref(Box), + #[serde(rename = "app.bsky.actor.defs#hiddenPostsPref")] + HiddenPostsPref(Box), + #[serde(rename = "app.bsky.actor.defs#bskyAppStatePref")] + BskyAppStatePref(Box), + #[serde(rename = "app.bsky.actor.defs#labelersPref")] + LabelersPref(Box), + #[serde(rename = "app.bsky.actor.defs#postInteractionSettingsPref")] + PostInteractionSettingsPref(Box), + #[serde(rename = "app.bsky.actor.defs#verificationPrefs")] + VerificationPrefs(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum StatusViewEmbedRefs { + #[serde(rename = "app.bsky.embed.external#view")] + AppBskyEmbedExternalView(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/get_preferences.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/get_preferences.rs new file mode 100644 index 0000000..cc8ed58 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/get_preferences.rs @@ -0,0 +1,21 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.getPreferences` namespace. +pub const NSID: &str = "app.bsky.actor.getPreferences"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData {} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub preferences: crate::app::bsky::actor::defs::Preferences, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/get_profile.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/get_profile.rs new file mode 100644 index 0000000..6f7b3dd --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/get_profile.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.getProfile` namespace. +pub const NSID: &str = "app.bsky.actor.getProfile"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Handle or DID of account to fetch profile of. + pub actor: atrium_api::types::string::AtIdentifier, +} +pub type Parameters = atrium_api::types::Object; +pub type Output = crate::app::bsky::actor::defs::ProfileViewDetailed; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/get_profiles.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/get_profiles.rs new file mode 100644 index 0000000..b6292bf --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/get_profiles.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.getProfiles` namespace. +pub const NSID: &str = "app.bsky.actor.getProfiles"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actors: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub profiles: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/get_suggestions.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/get_suggestions.rs new file mode 100644 index 0000000..3a5c244 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/get_suggestions.rs @@ -0,0 +1,31 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.getSuggestions` namespace. +pub const NSID: &str = "app.bsky.actor.getSuggestions"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub actors: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Snowflake for this recommendation, use when submitting recommendation events. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rec_id: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/profile.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/profile.rs new file mode 100644 index 0000000..067a3b6 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/profile.rs @@ -0,0 +1,41 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.profile` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + ///Small image to be displayed next to posts from account. AKA, 'profile picture' + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + ///Larger horizontal image to display behind profile view. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub banner: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + ///Free-form profile description text. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub joined_via_starter_pack: core::option::Option< + crate::com::atproto::repo::strong_ref::Main, + >, + ///Self-label values, specific to the Bluesky application, on the overall account. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub pinned_post: core::option::Option, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum RecordLabelsRefs { + #[serde(rename = "com.atproto.label.defs#selfLabels")] + ComAtprotoLabelDefsSelfLabels(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/put_preferences.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/put_preferences.rs new file mode 100644 index 0000000..06873df --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/put_preferences.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.putPreferences` namespace. +pub const NSID: &str = "app.bsky.actor.putPreferences"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub preferences: crate::app::bsky::actor::defs::Preferences, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/search_actors.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/search_actors.rs new file mode 100644 index 0000000..8dd85df --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/search_actors.rs @@ -0,0 +1,34 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.searchActors` namespace. +pub const NSID: &str = "app.bsky.actor.searchActors"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub q: core::option::Option, + ///DEPRECATED: use 'q' instead. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub term: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub actors: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/search_actors_typeahead.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/search_actors_typeahead.rs new file mode 100644 index 0000000..4abc021 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/search_actors_typeahead.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.searchActorsTypeahead` namespace. +pub const NSID: &str = "app.bsky.actor.searchActorsTypeahead"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Search query prefix; not a full query string. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub q: core::option::Option, + ///DEPRECATED: use 'q' instead. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub term: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub actors: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/actor/status.rs b/crates/weaver-common/src/lexicons/app/bsky/actor/status.rs new file mode 100644 index 0000000..5834d63 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/actor/status.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.actor.status` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + ///The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub duration_minutes: core::option::Option, + ///An optional embed associated with the status. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embed: core::option::Option>, + ///The status for the account. + pub status: String, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +///Advertises an account as currently offering live content. +pub const LIVE: &str = "app.bsky.actor.status#live"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum RecordEmbedRefs { + #[serde(rename = "app.bsky.embed.external")] + AppBskyEmbedExternalMain(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/embed.rs b/crates/weaver-common/src/lexicons/app/bsky/embed.rs new file mode 100644 index 0000000..c68b8e0 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/embed.rs @@ -0,0 +1,8 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.embed` namespace. +pub mod defs; +pub mod external; +pub mod images; +pub mod record; +pub mod record_with_media; +pub mod video; diff --git a/crates/weaver-common/src/lexicons/app/bsky/embed/defs.rs b/crates/weaver-common/src/lexicons/app/bsky/embed/defs.rs new file mode 100644 index 0000000..48cd038 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/embed/defs.rs @@ -0,0 +1,10 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.embed.defs` namespace. +///width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AspectRatioData { + pub height: core::num::NonZeroU64, + pub width: core::num::NonZeroU64, +} +pub type AspectRatio = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/embed/external.rs b/crates/weaver-common/src/lexicons/app/bsky/embed/external.rs new file mode 100644 index 0000000..46ff548 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/embed/external.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.embed.external` namespace. +///A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + pub external: External, +} +pub type Main = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ExternalData { + pub description: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thumb: core::option::Option, + pub title: String, + pub uri: String, +} +pub type External = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewData { + pub external: ViewExternal, +} +pub type View = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewExternalData { + pub description: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thumb: core::option::Option, + pub title: String, + pub uri: String, +} +pub type ViewExternal = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/embed/images.rs b/crates/weaver-common/src/lexicons/app/bsky/embed/images.rs new file mode 100644 index 0000000..f95cf2d --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/embed/images.rs @@ -0,0 +1,38 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.embed.images` namespace. +//!A set of images embedded in a Bluesky record (eg, a post). +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + pub images: Vec, +} +pub type Main = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ImageData { + ///Alt text description of the image, for accessibility. + pub alt: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub aspect_ratio: core::option::Option, + pub image: atrium_api::types::BlobRef, +} +pub type Image = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewData { + pub images: Vec, +} +pub type View = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewImageData { + ///Alt text description of the image, for accessibility. + pub alt: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub aspect_ratio: core::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. + pub fullsize: String, + ///Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. + pub thumb: String, +} +pub type ViewImage = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/embed/record.rs b/crates/weaver-common/src/lexicons/app/bsky/embed/record.rs new file mode 100644 index 0000000..8f7d53a --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/embed/record.rs @@ -0,0 +1,100 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.embed.record` namespace. +//!A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + pub record: crate::com::atproto::repo::strong_ref::Main, +} +pub type Main = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewData { + pub record: atrium_api::types::Union, +} +pub type View = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewBlockedData { + pub author: crate::app::bsky::feed::defs::BlockedAuthor, + pub blocked: bool, + pub uri: String, +} +pub type ViewBlocked = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewDetachedData { + pub detached: bool, + pub uri: String, +} +pub type ViewDetached = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewNotFoundData { + pub not_found: bool, + pub uri: String, +} +pub type ViewNotFound = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewRecordData { + pub author: crate::app::bsky::actor::defs::ProfileViewBasic, + pub cid: atrium_api::types::string::Cid, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embeds: core::option::Option< + Vec>, + >, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub quote_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reply_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub repost_count: core::option::Option, + pub uri: String, + ///The record data itself. + pub value: atrium_api::types::Unknown, +} +pub type ViewRecord = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ViewRecordEmbedsItem { + #[serde(rename = "app.bsky.embed.images#view")] + AppBskyEmbedImagesView(Box), + #[serde(rename = "app.bsky.embed.video#view")] + AppBskyEmbedVideoView(Box), + #[serde(rename = "app.bsky.embed.external#view")] + AppBskyEmbedExternalView(Box), + #[serde(rename = "app.bsky.embed.record#view")] + AppBskyEmbedRecordView(Box), + #[serde(rename = "app.bsky.embed.recordWithMedia#view")] + AppBskyEmbedRecordWithMediaView( + Box, + ), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ViewRecordRefs { + #[serde(rename = "app.bsky.embed.record#viewRecord")] + ViewRecord(Box), + #[serde(rename = "app.bsky.embed.record#viewNotFound")] + ViewNotFound(Box), + #[serde(rename = "app.bsky.embed.record#viewBlocked")] + ViewBlocked(Box), + #[serde(rename = "app.bsky.embed.record#viewDetached")] + ViewDetached(Box), + #[serde(rename = "app.bsky.feed.defs#generatorView")] + AppBskyFeedDefsGeneratorView(Box), + #[serde(rename = "app.bsky.graph.defs#listView")] + AppBskyGraphDefsListView(Box), + #[serde(rename = "app.bsky.labeler.defs#labelerView")] + AppBskyLabelerDefsLabelerView(Box), + #[serde(rename = "app.bsky.graph.defs#starterPackViewBasic")] + AppBskyGraphDefsStarterPackViewBasic( + Box, + ), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/embed/record_with_media.rs b/crates/weaver-common/src/lexicons/app/bsky/embed/record_with_media.rs new file mode 100644 index 0000000..6ca6313 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/embed/record_with_media.rs @@ -0,0 +1,37 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.embed.recordWithMedia` namespace. +//!A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + pub media: atrium_api::types::Union, + pub record: crate::app::bsky::embed::record::Main, +} +pub type Main = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewData { + pub media: atrium_api::types::Union, + pub record: crate::app::bsky::embed::record::View, +} +pub type View = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum MainMediaRefs { + #[serde(rename = "app.bsky.embed.images")] + AppBskyEmbedImagesMain(Box), + #[serde(rename = "app.bsky.embed.video")] + AppBskyEmbedVideoMain(Box), + #[serde(rename = "app.bsky.embed.external")] + AppBskyEmbedExternalMain(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ViewMediaRefs { + #[serde(rename = "app.bsky.embed.images#view")] + AppBskyEmbedImagesView(Box), + #[serde(rename = "app.bsky.embed.video#view")] + AppBskyEmbedVideoView(Box), + #[serde(rename = "app.bsky.embed.external#view")] + AppBskyEmbedExternalView(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/embed/video.rs b/crates/weaver-common/src/lexicons/app/bsky/embed/video.rs new file mode 100644 index 0000000..c78b569 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/embed/video.rs @@ -0,0 +1,37 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.embed.video` namespace. +//!A video embedded in a Bluesky record (eg, a post). +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + ///Alt text description of the video, for accessibility. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub alt: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub aspect_ratio: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub captions: core::option::Option>, + ///The mp4 video file. May be up to 100mb, formerly limited to 50mb. + pub video: atrium_api::types::BlobRef, +} +pub type Main = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct CaptionData { + pub file: atrium_api::types::BlobRef, + pub lang: atrium_api::types::string::Language, +} +pub type Caption = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub alt: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub aspect_ratio: core::option::Option, + pub cid: atrium_api::types::string::Cid, + pub playlist: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thumbnail: core::option::Option, +} +pub type View = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed.rs b/crates/weaver-common/src/lexicons/app/bsky/feed.rs new file mode 100644 index 0000000..6e2fbf6 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed.rs @@ -0,0 +1,27 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed` namespace. +pub mod defs; +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; diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/defs.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/defs.rs new file mode 100644 index 0000000..e93b999 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/defs.rs @@ -0,0 +1,311 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct BlockedAuthorData { + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type BlockedAuthor = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct BlockedPostData { + pub author: BlockedAuthor, + pub blocked: bool, + pub uri: String, +} +pub type BlockedPost = atrium_api::types::Object; +///User clicked through to the author of the feed item +pub const CLICKTHROUGH_AUTHOR: &str = "app.bsky.feed.defs#clickthroughAuthor"; +///User clicked through to the embedded content of the feed item +pub const CLICKTHROUGH_EMBED: &str = "app.bsky.feed.defs#clickthroughEmbed"; +///User clicked through to the feed item +pub const CLICKTHROUGH_ITEM: &str = "app.bsky.feed.defs#clickthroughItem"; +///User clicked through to the reposter of the feed item +pub const CLICKTHROUGH_REPOSTER: &str = "app.bsky.feed.defs#clickthroughReposter"; +///Declares the feed generator returns any types of posts. +pub const CONTENT_MODE_UNSPECIFIED: &str = "app.bsky.feed.defs#contentModeUnspecified"; +///Declares the feed generator returns posts containing app.bsky.embed.video embeds. +pub const CONTENT_MODE_VIDEO: &str = "app.bsky.feed.defs#contentModeVideo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct FeedViewPostData { + ///Context provided by feed generator that may be passed back alongside interactions. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub feed_context: core::option::Option, + pub post: PostView, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reason: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reply: core::option::Option, +} +pub type FeedViewPost = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct GeneratorViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub accepts_interactions: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + pub cid: atrium_api::types::string::Cid, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub content_mode: core::option::Option, + pub creator: crate::app::bsky::actor::defs::ProfileView, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description_facets: core::option::Option< + Vec, + >, + pub did: atrium_api::types::string::Did, + pub display_name: String, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like_count: core::option::Option, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type GeneratorView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct GeneratorViewerStateData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like: core::option::Option, +} +pub type GeneratorViewerState = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InteractionData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub event: core::option::Option, + ///Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub feed_context: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub item: core::option::Option, +} +pub type Interaction = atrium_api::types::Object; +///User liked the feed item +pub const INTERACTION_LIKE: &str = "app.bsky.feed.defs#interactionLike"; +///User quoted the feed item +pub const INTERACTION_QUOTE: &str = "app.bsky.feed.defs#interactionQuote"; +///User replied to the feed item +pub const INTERACTION_REPLY: &str = "app.bsky.feed.defs#interactionReply"; +///User reposted the feed item +pub const INTERACTION_REPOST: &str = "app.bsky.feed.defs#interactionRepost"; +///Feed item was seen by user +pub const INTERACTION_SEEN: &str = "app.bsky.feed.defs#interactionSeen"; +///User shared the feed item +pub const INTERACTION_SHARE: &str = "app.bsky.feed.defs#interactionShare"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct NotFoundPostData { + pub not_found: bool, + pub uri: String, +} +pub type NotFoundPost = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct PostViewData { + pub author: crate::app::bsky::actor::defs::ProfileViewBasic, + pub cid: atrium_api::types::string::Cid, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embed: core::option::Option>, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub quote_count: core::option::Option, + pub record: atrium_api::types::Unknown, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reply_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub repost_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub threadgate: core::option::Option, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type PostView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ReasonPinData {} +pub type ReasonPin = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ReasonRepostData { + pub by: crate::app::bsky::actor::defs::ProfileViewBasic, + pub indexed_at: atrium_api::types::string::Datetime, +} +pub type ReasonRepost = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ReplyRefData { + ///When parent is a reply to another post, this is the author of that post. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub grandparent_author: core::option::Option< + crate::app::bsky::actor::defs::ProfileViewBasic, + >, + pub parent: atrium_api::types::Union, + pub root: atrium_api::types::Union, +} +pub type ReplyRef = atrium_api::types::Object; +///Request that less content like the given feed item be shown in the feed +pub const REQUEST_LESS: &str = "app.bsky.feed.defs#requestLess"; +///Request that more content like the given feed item be shown in the feed +pub const REQUEST_MORE: &str = "app.bsky.feed.defs#requestMore"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SkeletonFeedPostData { + ///Context that will be passed through to client and may be passed to feed generator back alongside interactions. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub feed_context: core::option::Option, + pub post: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reason: core::option::Option< + atrium_api::types::Union, + >, +} +pub type SkeletonFeedPost = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SkeletonReasonPinData {} +pub type SkeletonReasonPin = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SkeletonReasonRepostData { + pub repost: String, +} +pub type SkeletonReasonRepost = atrium_api::types::Object; +///Metadata about this post within the context of the thread it is in. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ThreadContextData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub root_author_like: core::option::Option, +} +pub type ThreadContext = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ThreadViewPostData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub parent: core::option::Option>, + pub post: PostView, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub replies: core::option::Option< + Vec>, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thread_context: core::option::Option, +} +pub type ThreadViewPost = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ThreadgateViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lists: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub record: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub uri: core::option::Option, +} +pub type ThreadgateView = atrium_api::types::Object; +///Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewerStateData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embedding_disabled: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub pinned: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reply_disabled: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub repost: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thread_muted: core::option::Option, +} +pub type ViewerState = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum FeedViewPostReasonRefs { + #[serde(rename = "app.bsky.feed.defs#reasonRepost")] + ReasonRepost(Box), + #[serde(rename = "app.bsky.feed.defs#reasonPin")] + ReasonPin(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum PostViewEmbedRefs { + #[serde(rename = "app.bsky.embed.images#view")] + AppBskyEmbedImagesView(Box), + #[serde(rename = "app.bsky.embed.video#view")] + AppBskyEmbedVideoView(Box), + #[serde(rename = "app.bsky.embed.external#view")] + AppBskyEmbedExternalView(Box), + #[serde(rename = "app.bsky.embed.record#view")] + AppBskyEmbedRecordView(Box), + #[serde(rename = "app.bsky.embed.recordWithMedia#view")] + AppBskyEmbedRecordWithMediaView( + Box, + ), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ReplyRefParentRefs { + #[serde(rename = "app.bsky.feed.defs#postView")] + PostView(Box), + #[serde(rename = "app.bsky.feed.defs#notFoundPost")] + NotFoundPost(Box), + #[serde(rename = "app.bsky.feed.defs#blockedPost")] + BlockedPost(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ReplyRefRootRefs { + #[serde(rename = "app.bsky.feed.defs#postView")] + PostView(Box), + #[serde(rename = "app.bsky.feed.defs#notFoundPost")] + NotFoundPost(Box), + #[serde(rename = "app.bsky.feed.defs#blockedPost")] + BlockedPost(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum SkeletonFeedPostReasonRefs { + #[serde(rename = "app.bsky.feed.defs#skeletonReasonRepost")] + SkeletonReasonRepost(Box), + #[serde(rename = "app.bsky.feed.defs#skeletonReasonPin")] + SkeletonReasonPin(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ThreadViewPostParentRefs { + #[serde(rename = "app.bsky.feed.defs#threadViewPost")] + ThreadViewPost(Box), + #[serde(rename = "app.bsky.feed.defs#notFoundPost")] + NotFoundPost(Box), + #[serde(rename = "app.bsky.feed.defs#blockedPost")] + BlockedPost(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ThreadViewPostRepliesItem { + #[serde(rename = "app.bsky.feed.defs#threadViewPost")] + ThreadViewPost(Box), + #[serde(rename = "app.bsky.feed.defs#notFoundPost")] + NotFoundPost(Box), + #[serde(rename = "app.bsky.feed.defs#blockedPost")] + BlockedPost(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/describe_feed_generator.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/describe_feed_generator.rs new file mode 100644 index 0000000..25431fe --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/describe_feed_generator.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.describeFeedGenerator` namespace. +pub const NSID: &str = "app.bsky.feed.describeFeedGenerator"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub did: atrium_api::types::string::Did, + pub feeds: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub links: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct FeedData { + pub uri: String, +} +pub type Feed = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LinksData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub privacy_policy: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub terms_of_service: core::option::Option, +} +pub type Links = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/generator.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/generator.rs new file mode 100644 index 0000000..9b2817c --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/generator.rs @@ -0,0 +1,38 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.generator` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + ///Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub accepts_interactions: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub content_mode: core::option::Option, + pub created_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description_facets: core::option::Option< + Vec, + >, + pub did: atrium_api::types::string::Did, + pub display_name: String, + ///Self-label values + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum RecordLabelsRefs { + #[serde(rename = "com.atproto.label.defs#selfLabels")] + ComAtprotoLabelDefsSelfLabels(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_actor_feeds.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_actor_feeds.rs new file mode 100644 index 0000000..8275093 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_actor_feeds.rs @@ -0,0 +1,29 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getActorFeeds` namespace. +pub const NSID: &str = "app.bsky.feed.getActorFeeds"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actor: atrium_api::types::string::AtIdentifier, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feeds: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_actor_likes.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_actor_likes.rs new file mode 100644 index 0000000..d9c8d29 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_actor_likes.rs @@ -0,0 +1,46 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getActorLikes` namespace. +pub const NSID: &str = "app.bsky.feed.getActorLikes"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actor: atrium_api::types::string::AtIdentifier, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feed: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + BlockedActor(Option), + BlockedByActor(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::BlockedActor(msg) => { + write!(_f, "BlockedActor")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::BlockedByActor(msg) => { + write!(_f, "BlockedByActor")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_author_feed.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_author_feed.rs new file mode 100644 index 0000000..3f8ab79 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_author_feed.rs @@ -0,0 +1,51 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getAuthorFeed` namespace. +pub const NSID: &str = "app.bsky.feed.getAuthorFeed"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actor: atrium_api::types::string::AtIdentifier, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Combinations of post/repost types to include in response. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub filter: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub include_pins: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feed: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + BlockedActor(Option), + BlockedByActor(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::BlockedActor(msg) => { + write!(_f, "BlockedActor")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::BlockedByActor(msg) => { + write!(_f, "BlockedByActor")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed.rs new file mode 100644 index 0000000..8e59cc1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed.rs @@ -0,0 +1,39 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getFeed` namespace. +pub const NSID: &str = "app.bsky.feed.getFeed"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feed: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feed: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + UnknownFeed(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::UnknownFeed(msg) => { + write!(_f, "UnknownFeed")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed_generator.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed_generator.rs new file mode 100644 index 0000000..d8a8944 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed_generator.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getFeedGenerator` namespace. +pub const NSID: &str = "app.bsky.feed.getFeedGenerator"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///AT-URI of the feed generator record. + pub feed: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///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, + pub view: crate::app::bsky::feed::defs::GeneratorView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed_generators.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed_generators.rs new file mode 100644 index 0000000..b5eb607 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed_generators.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getFeedGenerators` namespace. +pub const NSID: &str = "app.bsky.feed.getFeedGenerators"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub feeds: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub feeds: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed_skeleton.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed_skeleton.rs new file mode 100644 index 0000000..4df33a4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_feed_skeleton.rs @@ -0,0 +1,40 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getFeedSkeleton` namespace. +pub const NSID: &str = "app.bsky.feed.getFeedSkeleton"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Reference to feed generator record describing the specific feed being requested. + pub feed: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feed: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + UnknownFeed(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::UnknownFeed(msg) => { + write!(_f, "UnknownFeed")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_likes.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_likes.rs new file mode 100644 index 0000000..7ac732b --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_likes.rs @@ -0,0 +1,44 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getLikes` namespace. +pub const NSID: &str = "app.bsky.feed.getLikes"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///CID of the subject record (aka, specific version of record), to filter likes. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///AT-URI of the subject (eg, a post record). + pub uri: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub likes: Vec, + pub uri: String, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LikeData { + pub actor: crate::app::bsky::actor::defs::ProfileView, + pub created_at: atrium_api::types::string::Datetime, + pub indexed_at: atrium_api::types::string::Datetime, +} +pub type Like = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_list_feed.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_list_feed.rs new file mode 100644 index 0000000..58475a3 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_list_feed.rs @@ -0,0 +1,40 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getListFeed` namespace. +pub const NSID: &str = "app.bsky.feed.getListFeed"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Reference (AT-URI) to the list record. + pub list: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feed: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + UnknownList(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::UnknownList(msg) => { + write!(_f, "UnknownList")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_post_thread.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_post_thread.rs new file mode 100644 index 0000000..f5f1a10 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_post_thread.rs @@ -0,0 +1,52 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getPostThread` namespace. +pub const NSID: &str = "app.bsky.feed.getPostThread"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///How many levels of reply depth should be included in response. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub depth: core::option::Option>, + ///How many levels of parent (and grandparent, etc) post to include. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub parent_height: core::option::Option>, + ///Reference (AT-URI) to post record. + pub uri: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub thread: atrium_api::types::Union, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub threadgate: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + NotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::NotFound(msg) => { + write!(_f, "NotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputThreadRefs { + #[serde(rename = "app.bsky.feed.defs#threadViewPost")] + AppBskyFeedDefsThreadViewPost(Box), + #[serde(rename = "app.bsky.feed.defs#notFoundPost")] + AppBskyFeedDefsNotFoundPost(Box), + #[serde(rename = "app.bsky.feed.defs#blockedPost")] + AppBskyFeedDefsBlockedPost(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_posts.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_posts.rs new file mode 100644 index 0000000..ea461e5 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_posts.rs @@ -0,0 +1,24 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getPosts` namespace. +pub const NSID: &str = "app.bsky.feed.getPosts"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///List of post AT-URIs to return hydrated views for. + pub uris: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub posts: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_quotes.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_quotes.rs new file mode 100644 index 0000000..46f63d5 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_quotes.rs @@ -0,0 +1,36 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getQuotes` namespace. +pub const NSID: &str = "app.bsky.feed.getQuotes"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///If supplied, filters to quotes of specific version (by CID) of the post record. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Reference (AT-URI) of post record + pub uri: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub posts: Vec, + pub uri: String, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_reposted_by.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_reposted_by.rs new file mode 100644 index 0000000..ea06592 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_reposted_by.rs @@ -0,0 +1,36 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getRepostedBy` namespace. +pub const NSID: &str = "app.bsky.feed.getRepostedBy"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///If supplied, filters to reposts of specific version (by CID) of the post record. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Reference (AT-URI) of post record + pub uri: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub reposted_by: Vec, + pub uri: String, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_suggested_feeds.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_suggested_feeds.rs new file mode 100644 index 0000000..b79cb4e --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_suggested_feeds.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getSuggestedFeeds` namespace. +pub const NSID: &str = "app.bsky.feed.getSuggestedFeeds"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feeds: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/get_timeline.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/get_timeline.rs new file mode 100644 index 0000000..40f8720 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/get_timeline.rs @@ -0,0 +1,31 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.getTimeline` namespace. +pub const NSID: &str = "app.bsky.feed.getTimeline"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub algorithm: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feed: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/like.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/like.rs new file mode 100644 index 0000000..ff993ea --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/like.rs @@ -0,0 +1,15 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.like` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + pub subject: crate::com::atproto::repo::strong_ref::Main, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/post.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/post.rs new file mode 100644 index 0000000..d0e5157 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/post.rs @@ -0,0 +1,83 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.post` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + ///Client-declared timestamp when this post was originally created. + pub created_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embed: core::option::Option>, + ///DEPRECATED: replaced by app.bsky.richtext.facet. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub entities: core::option::Option>, + ///Annotations of text (mentions, URLs, hashtags, etc) + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub facets: core::option::Option>, + ///Self-label values for this post. Effectively content warnings. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + ///Indicates human language of post primary text content. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub langs: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reply: core::option::Option, + ///Additional hashtags, in addition to any included in post text and facets. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub tags: core::option::Option>, + ///The primary post content. May be an empty string, if there are embeds. + pub text: String, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +///Deprecated: use facets instead. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct EntityData { + pub index: TextSlice, + ///Expected values are 'mention' and 'link'. + pub r#type: String, + pub value: String, +} +pub type Entity = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ReplyRefData { + pub parent: crate::com::atproto::repo::strong_ref::Main, + pub root: crate::com::atproto::repo::strong_ref::Main, +} +pub type ReplyRef = atrium_api::types::Object; +///Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct TextSliceData { + pub end: usize, + pub start: usize, +} +pub type TextSlice = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum RecordEmbedRefs { + #[serde(rename = "app.bsky.embed.images")] + AppBskyEmbedImagesMain(Box), + #[serde(rename = "app.bsky.embed.video")] + AppBskyEmbedVideoMain(Box), + #[serde(rename = "app.bsky.embed.external")] + AppBskyEmbedExternalMain(Box), + #[serde(rename = "app.bsky.embed.record")] + AppBskyEmbedRecordMain(Box), + #[serde(rename = "app.bsky.embed.recordWithMedia")] + AppBskyEmbedRecordWithMediaMain( + Box, + ), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum RecordLabelsRefs { + #[serde(rename = "com.atproto.label.defs#selfLabels")] + ComAtprotoLabelDefsSelfLabels(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/postgate.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/postgate.rs new file mode 100644 index 0000000..12d9b48 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/postgate.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.postgate` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + ///List of AT-URIs embedding this post that the author has detached from. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub detached_embedding_uris: core::option::Option>, + ///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 = "core::option::Option::is_none")] + pub embedding_rules: core::option::Option< + Vec>, + >, + ///Reference (AT-URI) to the post record. + pub post: String, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +///Disables embedding of this post. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct DisableRuleData {} +pub type DisableRule = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum RecordEmbeddingRulesItem { + #[serde(rename = "app.bsky.feed.postgate#disableRule")] + DisableRule(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/repost.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/repost.rs new file mode 100644 index 0000000..6950b46 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/repost.rs @@ -0,0 +1,15 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.repost` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + pub subject: crate::com::atproto::repo::strong_ref::Main, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/search_posts.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/search_posts.rs new file mode 100644 index 0000000..45e00b1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/search_posts.rs @@ -0,0 +1,71 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.searchPosts` namespace. +pub const NSID: &str = "app.bsky.feed.searchPosts"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Filter to posts by the given account. Handles are resolved to DID before query-time. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub author: core::option::Option, + ///Optional pagination mechanism; may not necessarily allow scrolling through entire result set. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub domain: core::option::Option, + ///Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lang: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub mentions: core::option::Option, + ///Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + pub q: String, + ///Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, + ///Specifies the ranking order of results. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort: core::option::Option, + ///Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub tag: core::option::Option>, + ///Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub until: core::option::Option, + ///Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub url: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::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 = "core::option::Option::is_none")] + pub hits_total: core::option::Option, + pub posts: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + BadQueryString(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::BadQueryString(msg) => { + write!(_f, "BadQueryString")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/send_interactions.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/send_interactions.rs new file mode 100644 index 0000000..ef1ae1c --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/send_interactions.rs @@ -0,0 +1,21 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.sendInteractions` namespace. +pub const NSID: &str = "app.bsky.feed.sendInteractions"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub interactions: Vec, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData {} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/feed/threadgate.rs b/crates/weaver-common/src/lexicons/app/bsky/feed/threadgate.rs new file mode 100644 index 0000000..fa04553 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/feed/threadgate.rs @@ -0,0 +1,56 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.feed.threadgate` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + ///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 = "core::option::Option::is_none")] + pub allow: core::option::Option>>, + pub created_at: atrium_api::types::string::Datetime, + ///List of hidden reply URIs. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hidden_replies: core::option::Option>, + ///Reference (AT-URI) to the post record. + pub post: String, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +///Allow replies from actors who follow you. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct FollowerRuleData {} +pub type FollowerRule = atrium_api::types::Object; +///Allow replies from actors you follow. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct FollowingRuleData {} +pub type FollowingRule = atrium_api::types::Object; +///Allow replies from actors on a list. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ListRuleData { + pub list: String, +} +pub type ListRule = atrium_api::types::Object; +///Allow replies from actors mentioned in your post. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MentionRuleData {} +pub type MentionRule = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum RecordAllowItem { + #[serde(rename = "app.bsky.feed.threadgate#mentionRule")] + MentionRule(Box), + #[serde(rename = "app.bsky.feed.threadgate#followerRule")] + FollowerRule(Box), + #[serde(rename = "app.bsky.feed.threadgate#followingRule")] + FollowingRule(Box), + #[serde(rename = "app.bsky.feed.threadgate#listRule")] + ListRule(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph.rs b/crates/weaver-common/src/lexicons/app/bsky/graph.rs new file mode 100644 index 0000000..13fe61e --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph.rs @@ -0,0 +1,31 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph` namespace. +pub mod block; +pub mod defs; +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_mutes; +pub mod get_relationships; +pub mod get_starter_pack; +pub mod get_starter_packs; +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; diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/block.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/block.rs new file mode 100644 index 0000000..60ae226 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/block.rs @@ -0,0 +1,16 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.block` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + ///DID of the account to be blocked. + pub subject: atrium_api::types::string::Did, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/defs.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/defs.rs new file mode 100644 index 0000000..975e007 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/defs.rs @@ -0,0 +1,130 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.defs` namespace. +///A list of actors used for curation purposes such as list feeds or interaction gating. +pub const CURATELIST: &str = "app.bsky.graph.defs#curatelist"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ListItemViewData { + pub subject: crate::app::bsky::actor::defs::ProfileView, + pub uri: String, +} +pub type ListItemView = atrium_api::types::Object; +pub type ListPurpose = String; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ListViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + pub cid: atrium_api::types::string::Cid, + pub creator: crate::app::bsky::actor::defs::ProfileView, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description_facets: core::option::Option< + Vec, + >, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub list_item_count: core::option::Option, + pub name: String, + pub purpose: ListPurpose, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type ListView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ListViewBasicData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + pub cid: atrium_api::types::string::Cid, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub indexed_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub list_item_count: core::option::Option, + pub name: String, + pub purpose: ListPurpose, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type ListViewBasic = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ListViewerStateData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub blocked: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub muted: core::option::Option, +} +pub type ListViewerState = atrium_api::types::Object; +///A list of actors to apply an aggregate moderation action (mute/block) on. +pub const MODLIST: &str = "app.bsky.graph.defs#modlist"; +///indicates that a handle or DID could not be resolved +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct NotFoundActorData { + pub actor: atrium_api::types::string::AtIdentifier, + pub not_found: bool, +} +pub type NotFoundActor = atrium_api::types::Object; +///A list of actors used for only for reference purposes such as within a starter pack. +pub const REFERENCELIST: &str = "app.bsky.graph.defs#referencelist"; +///lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RelationshipData { + pub did: atrium_api::types::string::Did, + ///if the actor is followed by this DID, contains the AT-URI of the follow record + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub followed_by: core::option::Option, + ///if the actor follows this DID, this is the AT-URI of the follow record + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub following: core::option::Option, +} +pub type Relationship = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct StarterPackViewData { + pub cid: atrium_api::types::string::Cid, + pub creator: crate::app::bsky::actor::defs::ProfileViewBasic, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub feeds: core::option::Option>, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub joined_all_time_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub joined_week_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub list: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub list_items_sample: core::option::Option>, + pub record: atrium_api::types::Unknown, + pub uri: String, +} +pub type StarterPackView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct StarterPackViewBasicData { + pub cid: atrium_api::types::string::Cid, + pub creator: crate::app::bsky::actor::defs::ProfileViewBasic, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub joined_all_time_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub joined_week_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub list_item_count: core::option::Option, + pub record: atrium_api::types::Unknown, + pub uri: String, +} +pub type StarterPackViewBasic = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/follow.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/follow.rs new file mode 100644 index 0000000..4dc9c99 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/follow.rs @@ -0,0 +1,15 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.follow` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + pub subject: atrium_api::types::string::Did, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_actor_starter_packs.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_actor_starter_packs.rs new file mode 100644 index 0000000..81ca107 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_actor_starter_packs.rs @@ -0,0 +1,29 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getActorStarterPacks` namespace. +pub const NSID: &str = "app.bsky.graph.getActorStarterPacks"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actor: atrium_api::types::string::AtIdentifier, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub starter_packs: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_blocks.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_blocks.rs new file mode 100644 index 0000000..66d509b --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_blocks.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getBlocks` namespace. +pub const NSID: &str = "app.bsky.graph.getBlocks"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub blocks: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_followers.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_followers.rs new file mode 100644 index 0000000..b1d92ae --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_followers.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getFollowers` namespace. +pub const NSID: &str = "app.bsky.graph.getFollowers"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actor: atrium_api::types::string::AtIdentifier, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub followers: Vec, + pub subject: crate::app::bsky::actor::defs::ProfileView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_follows.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_follows.rs new file mode 100644 index 0000000..ff30319 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_follows.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getFollows` namespace. +pub const NSID: &str = "app.bsky.graph.getFollows"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actor: atrium_api::types::string::AtIdentifier, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub follows: Vec, + pub subject: crate::app::bsky::actor::defs::ProfileView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_known_followers.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_known_followers.rs new file mode 100644 index 0000000..732f2d3 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_known_followers.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getKnownFollowers` namespace. +pub const NSID: &str = "app.bsky.graph.getKnownFollowers"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actor: atrium_api::types::string::AtIdentifier, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub followers: Vec, + pub subject: crate::app::bsky::actor::defs::ProfileView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_list.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_list.rs new file mode 100644 index 0000000..f39e89d --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_list.rs @@ -0,0 +1,31 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getList` namespace. +pub const NSID: &str = "app.bsky.graph.getList"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Reference (AT-URI) of the list record to hydrate. + pub list: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub items: Vec, + pub list: crate::app::bsky::graph::defs::ListView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_list_blocks.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_list_blocks.rs new file mode 100644 index 0000000..543bd33 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_list_blocks.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getListBlocks` namespace. +pub const NSID: &str = "app.bsky.graph.getListBlocks"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub lists: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_list_mutes.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_list_mutes.rs new file mode 100644 index 0000000..b7fcddb --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_list_mutes.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getListMutes` namespace. +pub const NSID: &str = "app.bsky.graph.getListMutes"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub lists: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_lists.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_lists.rs new file mode 100644 index 0000000..345886e --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_lists.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getLists` namespace. +pub const NSID: &str = "app.bsky.graph.getLists"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The account (actor) to enumerate lists from. + pub actor: atrium_api::types::string::AtIdentifier, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub lists: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_mutes.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_mutes.rs new file mode 100644 index 0000000..d2aeed5 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_mutes.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getMutes` namespace. +pub const NSID: &str = "app.bsky.graph.getMutes"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub mutes: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_relationships.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_relationships.rs new file mode 100644 index 0000000..c6075a6 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_relationships.rs @@ -0,0 +1,48 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getRelationships` namespace. +pub const NSID: &str = "app.bsky.graph.getRelationships"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Primary account requesting relationships for. + pub actor: atrium_api::types::string::AtIdentifier, + ///List of 'other' accounts to be related back to the primary. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub others: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub actor: core::option::Option, + pub relationships: Vec>, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///the primary actor at-identifier could not be resolved + ActorNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::ActorNotFound(msg) => { + write!(_f, "ActorNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputRelationshipsItem { + #[serde(rename = "app.bsky.graph.defs#relationship")] + AppBskyGraphDefsRelationship(Box), + #[serde(rename = "app.bsky.graph.defs#notFoundActor")] + AppBskyGraphDefsNotFoundActor(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_starter_pack.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_starter_pack.rs new file mode 100644 index 0000000..c3c5480 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_starter_pack.rs @@ -0,0 +1,24 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getStarterPack` namespace. +pub const NSID: &str = "app.bsky.graph.getStarterPack"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Reference (AT-URI) of the starter pack record. + pub starter_pack: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub starter_pack: crate::app::bsky::graph::defs::StarterPackView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_starter_packs.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_starter_packs.rs new file mode 100644 index 0000000..ce168f2 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_starter_packs.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getStarterPacks` namespace. +pub const NSID: &str = "app.bsky.graph.getStarterPacks"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub uris: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub starter_packs: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/get_suggested_follows_by_actor.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/get_suggested_follows_by_actor.rs new file mode 100644 index 0000000..e1b5e24 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/get_suggested_follows_by_actor.rs @@ -0,0 +1,29 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.getSuggestedFollowsByActor` namespace. +pub const NSID: &str = "app.bsky.graph.getSuggestedFollowsByActor"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actor: atrium_api::types::string::AtIdentifier, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///If true, response has fallen-back to generic results, and is not scoped using relativeToDid + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub is_fallback: core::option::Option, + ///Snowflake for this recommendation, use when submitting recommendation events. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rec_id: core::option::Option, + pub suggestions: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/list.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/list.rs new file mode 100644 index 0000000..e9482b9 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/list.rs @@ -0,0 +1,34 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.list` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + pub created_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description_facets: core::option::Option< + Vec, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + ///Display name for list; can not be empty. + pub name: String, + ///Defines the purpose of the list (aka, moderation-oriented or curration-oriented) + pub purpose: crate::app::bsky::graph::defs::ListPurpose, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum RecordLabelsRefs { + #[serde(rename = "com.atproto.label.defs#selfLabels")] + ComAtprotoLabelDefsSelfLabels(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/listblock.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/listblock.rs new file mode 100644 index 0000000..1fdd321 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/listblock.rs @@ -0,0 +1,16 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.listblock` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + ///Reference (AT-URI) to the mod list record. + pub subject: String, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/listitem.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/listitem.rs new file mode 100644 index 0000000..a62c409 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/listitem.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.listitem` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + ///Reference (AT-URI) to the list record (app.bsky.graph.list). + pub list: String, + ///The account which is included on the list. + pub subject: atrium_api::types::string::Did, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/mute_actor.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/mute_actor.rs new file mode 100644 index 0000000..a3a3aae --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/mute_actor.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.muteActor` namespace. +pub const NSID: &str = "app.bsky.graph.muteActor"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub actor: atrium_api::types::string::AtIdentifier, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/mute_actor_list.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/mute_actor_list.rs new file mode 100644 index 0000000..30cc212 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/mute_actor_list.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.muteActorList` namespace. +pub const NSID: &str = "app.bsky.graph.muteActorList"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub list: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/mute_thread.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/mute_thread.rs new file mode 100644 index 0000000..7f71996 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/mute_thread.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.muteThread` namespace. +pub const NSID: &str = "app.bsky.graph.muteThread"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub root: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/search_starter_packs.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/search_starter_packs.rs new file mode 100644 index 0000000..f3fe0c9 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/search_starter_packs.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.searchStarterPacks` namespace. +pub const NSID: &str = "app.bsky.graph.searchStarterPacks"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + pub q: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub starter_packs: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/starterpack.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/starterpack.rs new file mode 100644 index 0000000..ebb5c5d --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/starterpack.rs @@ -0,0 +1,32 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.starterpack` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description_facets: core::option::Option< + Vec, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub feeds: core::option::Option>, + ///Reference (AT-URI) to the list record. + pub list: String, + ///Display name for starter pack; can not be empty. + pub name: String, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct FeedItemData { + pub uri: String, +} +pub type FeedItem = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/unmute_actor.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/unmute_actor.rs new file mode 100644 index 0000000..636d8cb --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/unmute_actor.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.unmuteActor` namespace. +pub const NSID: &str = "app.bsky.graph.unmuteActor"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub actor: atrium_api::types::string::AtIdentifier, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/unmute_actor_list.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/unmute_actor_list.rs new file mode 100644 index 0000000..80eb35a --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/unmute_actor_list.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.unmuteActorList` namespace. +pub const NSID: &str = "app.bsky.graph.unmuteActorList"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub list: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/unmute_thread.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/unmute_thread.rs new file mode 100644 index 0000000..ecac160 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/unmute_thread.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.unmuteThread` namespace. +pub const NSID: &str = "app.bsky.graph.unmuteThread"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub root: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/graph/verification.rs b/crates/weaver-common/src/lexicons/app/bsky/graph/verification.rs new file mode 100644 index 0000000..4a6d71a --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/graph/verification.rs @@ -0,0 +1,21 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.graph.verification` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + ///Date of when the verification was created. + pub created_at: atrium_api::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. + pub display_name: String, + ///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. + pub handle: atrium_api::types::string::Handle, + ///DID of the subject the verification applies to. + pub subject: atrium_api::types::string::Did, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/labeler.rs b/crates/weaver-common/src/lexicons/app/bsky/labeler.rs new file mode 100644 index 0000000..eea1cb0 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/labeler.rs @@ -0,0 +1,5 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.labeler` namespace. +pub mod defs; +pub mod get_services; +pub mod service; diff --git a/crates/weaver-common/src/lexicons/app/bsky/labeler/defs.rs b/crates/weaver-common/src/lexicons/app/bsky/labeler/defs.rs new file mode 100644 index 0000000..61f04fb --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/labeler/defs.rs @@ -0,0 +1,65 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.labeler.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelerPoliciesData { + ///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 = "core::option::Option::is_none")] + pub label_value_definitions: core::option::Option< + Vec, + >, + ///The label values which this labeler publishes. May include global or custom labels. + pub label_values: Vec, +} +pub type LabelerPolicies = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelerViewData { + pub cid: atrium_api::types::string::Cid, + pub creator: crate::app::bsky::actor::defs::ProfileView, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like_count: core::option::Option, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type LabelerView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelerViewDetailedData { + pub cid: atrium_api::types::string::Cid, + pub creator: crate::app::bsky::actor::defs::ProfileView, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like_count: core::option::Option, + pub policies: crate::app::bsky::labeler::defs::LabelerPolicies, + ///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 = "core::option::Option::is_none")] + pub reason_types: core::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 = "core::option::Option::is_none")] + pub subject_collections: core::option::Option>, + ///The set of subject types (account, record, etc) this service accepts reports on. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_types: core::option::Option< + Vec, + >, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type LabelerViewDetailed = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelerViewerStateData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like: core::option::Option, +} +pub type LabelerViewerState = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/labeler/get_services.rs b/crates/weaver-common/src/lexicons/app/bsky/labeler/get_services.rs new file mode 100644 index 0000000..da7f88b --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/labeler/get_services.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.labeler.getServices` namespace. +pub const NSID: &str = "app.bsky.labeler.getServices"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub detailed: core::option::Option, + pub dids: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub views: Vec>, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputViewsItem { + #[serde(rename = "app.bsky.labeler.defs#labelerView")] + AppBskyLabelerDefsLabelerView(Box), + #[serde(rename = "app.bsky.labeler.defs#labelerViewDetailed")] + AppBskyLabelerDefsLabelerViewDetailed( + Box, + ), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/labeler/service.rs b/crates/weaver-common/src/lexicons/app/bsky/labeler/service.rs new file mode 100644 index 0000000..734e833 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/labeler/service.rs @@ -0,0 +1,36 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.labeler.service` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub created_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + pub policies: crate::app::bsky::labeler::defs::LabelerPolicies, + ///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 = "core::option::Option::is_none")] + pub reason_types: core::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 = "core::option::Option::is_none")] + pub subject_collections: core::option::Option>, + ///The set of subject types (account, record, etc) this service accepts reports on. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_types: core::option::Option< + Vec, + >, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum RecordLabelsRefs { + #[serde(rename = "com.atproto.label.defs#selfLabels")] + ComAtprotoLabelDefsSelfLabels(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/notification.rs b/crates/weaver-common/src/lexicons/app/bsky/notification.rs new file mode 100644 index 0000000..7c070af --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/notification.rs @@ -0,0 +1,8 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.notification` namespace. +pub mod defs; +pub mod get_unread_count; +pub mod list_notifications; +pub mod put_preferences; +pub mod register_push; +pub mod update_seen; diff --git a/crates/weaver-common/src/lexicons/app/bsky/notification/defs.rs b/crates/weaver-common/src/lexicons/app/bsky/notification/defs.rs new file mode 100644 index 0000000..2c8510f --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/notification/defs.rs @@ -0,0 +1,6 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.notification.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordDeletedData {} +pub type RecordDeleted = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/notification/get_unread_count.rs b/crates/weaver-common/src/lexicons/app/bsky/notification/get_unread_count.rs new file mode 100644 index 0000000..996eecd --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/notification/get_unread_count.rs @@ -0,0 +1,26 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.notification.getUnreadCount` namespace. +pub const NSID: &str = "app.bsky.notification.getUnreadCount"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub priority: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub seen_at: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub count: i64, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/notification/list_notifications.rs b/crates/weaver-common/src/lexicons/app/bsky/notification/list_notifications.rs new file mode 100644 index 0000000..f231ca8 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/notification/list_notifications.rs @@ -0,0 +1,56 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.notification.listNotifications` namespace. +pub const NSID: &str = "app.bsky.notification.listNotifications"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub priority: core::option::Option, + ///Notification reasons to include in response. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reasons: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub seen_at: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub notifications: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub priority: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub seen_at: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct NotificationData { + pub author: crate::app::bsky::actor::defs::ProfileView, + pub cid: atrium_api::types::string::Cid, + pub indexed_at: atrium_api::types::string::Datetime, + pub is_read: bool, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + ///Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', 'starterpack-joined', 'verified', and 'unverified'. + pub reason: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reason_subject: core::option::Option, + pub record: atrium_api::types::Unknown, + pub uri: String, +} +pub type Notification = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/notification/put_preferences.rs b/crates/weaver-common/src/lexicons/app/bsky/notification/put_preferences.rs new file mode 100644 index 0000000..b5bdc4d --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/notification/put_preferences.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.notification.putPreferences` namespace. +pub const NSID: &str = "app.bsky.notification.putPreferences"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub priority: bool, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/notification/register_push.rs b/crates/weaver-common/src/lexicons/app/bsky/notification/register_push.rs new file mode 100644 index 0000000..66ba567 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/notification/register_push.rs @@ -0,0 +1,20 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.notification.registerPush` namespace. +pub const NSID: &str = "app.bsky.notification.registerPush"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub app_id: String, + pub platform: String, + pub service_did: atrium_api::types::string::Did, + pub token: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/notification/update_seen.rs b/crates/weaver-common/src/lexicons/app/bsky/notification/update_seen.rs new file mode 100644 index 0000000..0b40d3c --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/notification/update_seen.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.notification.updateSeen` namespace. +pub const NSID: &str = "app.bsky.notification.updateSeen"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub seen_at: atrium_api::types::string::Datetime, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/richtext.rs b/crates/weaver-common/src/lexicons/app/bsky/richtext.rs new file mode 100644 index 0000000..85b1cf8 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/richtext.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.richtext` namespace. +pub mod facet; diff --git a/crates/weaver-common/src/lexicons/app/bsky/richtext/facet.rs b/crates/weaver-common/src/lexicons/app/bsky/richtext/facet.rs new file mode 100644 index 0000000..355343a --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/richtext/facet.rs @@ -0,0 +1,49 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.richtext.facet` namespace. +///Annotation of a sub-string within rich text. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + pub features: Vec>, + pub index: ByteSlice, +} +pub type Main = atrium_api::types::Object; +///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. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ByteSliceData { + pub byte_end: usize, + pub byte_start: usize, +} +pub type ByteSlice = atrium_api::types::Object; +///Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LinkData { + pub uri: String, +} +pub type Link = atrium_api::types::Object; +///Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MentionData { + pub did: atrium_api::types::string::Did, +} +pub type Mention = atrium_api::types::Object; +///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'). +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct TagData { + pub tag: String, +} +pub type Tag = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum MainFeaturesItem { + #[serde(rename = "app.bsky.richtext.facet#mention")] + Mention(Box), + #[serde(rename = "app.bsky.richtext.facet#link")] + Link(Box), + #[serde(rename = "app.bsky.richtext.facet#tag")] + Tag(Box), +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced.rs new file mode 100644 index 0000000..51fa468 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced` namespace. +pub mod defs; +pub mod get_config; +pub mod get_popular_feed_generators; +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 search_actors_skeleton; +pub mod search_posts_skeleton; +pub mod search_starter_packs_skeleton; diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/defs.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/defs.rs new file mode 100644 index 0000000..92e1728 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/defs.rs @@ -0,0 +1,63 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SkeletonSearchActorData { + pub did: atrium_api::types::string::Did, +} +pub type SkeletonSearchActor = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SkeletonSearchPostData { + pub uri: String, +} +pub type SkeletonSearchPost = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SkeletonSearchStarterPackData { + pub uri: String, +} +pub type SkeletonSearchStarterPack = atrium_api::types::Object< + SkeletonSearchStarterPackData, +>; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SkeletonTrendData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub category: core::option::Option, + pub dids: Vec, + pub display_name: String, + pub link: String, + pub post_count: i64, + pub started_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, + pub topic: String, +} +pub type SkeletonTrend = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct TrendViewData { + pub actors: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub category: core::option::Option, + pub display_name: String, + pub link: String, + pub post_count: i64, + pub started_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, + pub topic: String, +} +pub type TrendView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct TrendingTopicData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, + pub link: String, + pub topic: String, +} +pub type TrendingTopic = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_config.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_config.rs new file mode 100644 index 0000000..306245c --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_config.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getConfig` namespace. +pub const NSID: &str = "app.bsky.unspecced.getConfig"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub check_email_confirmed: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_popular_feed_generators.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_popular_feed_generators.rs new file mode 100644 index 0000000..ec3bf1f --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_popular_feed_generators.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getPopularFeedGenerators` namespace. +pub const NSID: &str = "app.bsky.unspecced.getPopularFeedGenerators"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub query: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub feeds: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_feeds.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_feeds.rs new file mode 100644 index 0000000..ac8ebd0 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_feeds.rs @@ -0,0 +1,24 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getSuggestedFeeds` namespace. +pub const NSID: &str = "app.bsky.unspecced.getSuggestedFeeds"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub feeds: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_feeds_skeleton.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_feeds_skeleton.rs new file mode 100644 index 0000000..41c9d1d --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_feeds_skeleton.rs @@ -0,0 +1,27 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getSuggestedFeedsSkeleton` namespace. +pub const NSID: &str = "app.bsky.unspecced.getSuggestedFeedsSkeleton"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///DID of the account making the request (not included for public/unauthenticated queries). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub feeds: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_starter_packs.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_starter_packs.rs new file mode 100644 index 0000000..db5772f --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_starter_packs.rs @@ -0,0 +1,24 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getSuggestedStarterPacks` namespace. +pub const NSID: &str = "app.bsky.unspecced.getSuggestedStarterPacks"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub starter_packs: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_starter_packs_skeleton.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_starter_packs_skeleton.rs new file mode 100644 index 0000000..5a0798b --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_starter_packs_skeleton.rs @@ -0,0 +1,27 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getSuggestedStarterPacksSkeleton` namespace. +pub const NSID: &str = "app.bsky.unspecced.getSuggestedStarterPacksSkeleton"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///DID of the account making the request (not included for public/unauthenticated queries). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub starter_packs: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_users.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_users.rs new file mode 100644 index 0000000..0ee3253 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_users.rs @@ -0,0 +1,27 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getSuggestedUsers` namespace. +pub const NSID: &str = "app.bsky.unspecced.getSuggestedUsers"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Category of users to get suggestions for. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub category: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub actors: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_users_skeleton.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_users_skeleton.rs new file mode 100644 index 0000000..ed29260 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggested_users_skeleton.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getSuggestedUsersSkeleton` namespace. +pub const NSID: &str = "app.bsky.unspecced.getSuggestedUsersSkeleton"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Category of users to get suggestions for. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub category: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///DID of the account making the request (not included for public/unauthenticated queries). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub dids: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggestions_skeleton.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggestions_skeleton.rs new file mode 100644 index 0000000..6fd777a --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_suggestions_skeleton.rs @@ -0,0 +1,40 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getSuggestionsSkeleton` namespace. +pub const NSID: &str = "app.bsky.unspecced.getSuggestionsSkeleton"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub relative_to_did: core::option::Option, + ///DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub actors: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Snowflake for this recommendation, use when submitting recommendation events. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rec_id: core::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 = "core::option::Option::is_none")] + pub relative_to_did: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_tagged_suggestions.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_tagged_suggestions.rs new file mode 100644 index 0000000..c4465dc --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_tagged_suggestions.rs @@ -0,0 +1,29 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getTaggedSuggestions` namespace. +pub const NSID: &str = "app.bsky.unspecced.getTaggedSuggestions"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData {} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub suggestions: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SuggestionData { + pub subject: String, + pub subject_type: String, + pub tag: String, +} +pub type Suggestion = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_trending_topics.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_trending_topics.rs new file mode 100644 index 0000000..7b33671 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_trending_topics.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getTrendingTopics` namespace. +pub const NSID: &str = "app.bsky.unspecced.getTrendingTopics"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub suggested: Vec, + pub topics: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_trends.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_trends.rs new file mode 100644 index 0000000..025375a --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_trends.rs @@ -0,0 +1,24 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getTrends` namespace. +pub const NSID: &str = "app.bsky.unspecced.getTrends"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub trends: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_trends_skeleton.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_trends_skeleton.rs new file mode 100644 index 0000000..b1db0f9 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/get_trends_skeleton.rs @@ -0,0 +1,27 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.getTrendsSkeleton` namespace. +pub const NSID: &str = "app.bsky.unspecced.getTrendsSkeleton"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///DID of the account making the request (not included for public/unauthenticated queries). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub trends: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/search_actors_skeleton.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/search_actors_skeleton.rs new file mode 100644 index 0000000..f3a91ff --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/search_actors_skeleton.rs @@ -0,0 +1,50 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.searchActorsSkeleton` namespace. +pub const NSID: &str = "app.bsky.unspecced.searchActorsSkeleton"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Optional pagination mechanism; may not necessarily allow scrolling through entire result set. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. + pub q: String, + ///If true, acts as fast/simple 'typeahead' query. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub typeahead: core::option::Option, + ///DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub actors: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::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 = "core::option::Option::is_none")] + pub hits_total: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + BadQueryString(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::BadQueryString(msg) => { + write!(_f, "BadQueryString")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/search_posts_skeleton.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/search_posts_skeleton.rs new file mode 100644 index 0000000..136a415 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/search_posts_skeleton.rs @@ -0,0 +1,74 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.searchPostsSkeleton` namespace. +pub const NSID: &str = "app.bsky.unspecced.searchPostsSkeleton"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Filter to posts by the given account. Handles are resolved to DID before query-time. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub author: core::option::Option, + ///Optional pagination mechanism; may not necessarily allow scrolling through entire result set. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub domain: core::option::Option, + ///Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lang: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub mentions: core::option::Option, + ///Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + pub q: String, + ///Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, + ///Specifies the ranking order of results. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort: core::option::Option, + ///Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub tag: core::option::Option>, + ///Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub until: core::option::Option, + ///Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub url: core::option::Option, + ///DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::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 = "core::option::Option::is_none")] + pub hits_total: core::option::Option, + pub posts: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + BadQueryString(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::BadQueryString(msg) => { + write!(_f, "BadQueryString")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/unspecced/search_starter_packs_skeleton.rs b/crates/weaver-common/src/lexicons/app/bsky/unspecced/search_starter_packs_skeleton.rs new file mode 100644 index 0000000..15d5691 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/unspecced/search_starter_packs_skeleton.rs @@ -0,0 +1,47 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.unspecced.searchStarterPacksSkeleton` namespace. +pub const NSID: &str = "app.bsky.unspecced.searchStarterPacksSkeleton"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Optional pagination mechanism; may not necessarily allow scrolling through entire result set. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + pub q: String, + ///DID of the account making the request (not included for public/unauthenticated queries). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::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 = "core::option::Option::is_none")] + pub hits_total: core::option::Option, + pub starter_packs: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + BadQueryString(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::BadQueryString(msg) => { + write!(_f, "BadQueryString")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/video.rs b/crates/weaver-common/src/lexicons/app/bsky/video.rs new file mode 100644 index 0000000..948cc12 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/video.rs @@ -0,0 +1,6 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.video` namespace. +pub mod defs; +pub mod get_job_status; +pub mod get_upload_limits; +pub mod upload_video; diff --git a/crates/weaver-common/src/lexicons/app/bsky/video/defs.rs b/crates/weaver-common/src/lexicons/app/bsky/video/defs.rs new file mode 100644 index 0000000..6a3c947 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/video/defs.rs @@ -0,0 +1,20 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.video.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct JobStatusData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub blob: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub error: core::option::Option, + pub job_id: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub message: core::option::Option, + ///Progress within the current processing state. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub progress: core::option::Option>, + ///The state of the video processing job. All values not listed as a known value indicate that the job is in process. + pub state: String, +} +pub type JobStatus = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/app/bsky/video/get_job_status.rs b/crates/weaver-common/src/lexicons/app/bsky/video/get_job_status.rs new file mode 100644 index 0000000..62fc969 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/video/get_job_status.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.video.getJobStatus` namespace. +pub const NSID: &str = "app.bsky.video.getJobStatus"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub job_id: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub job_status: crate::app::bsky::video::defs::JobStatus, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/video/get_upload_limits.rs b/crates/weaver-common/src/lexicons/app/bsky/video/get_upload_limits.rs new file mode 100644 index 0000000..00b9e8a --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/video/get_upload_limits.rs @@ -0,0 +1,25 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.video.getUploadLimits` namespace. +pub const NSID: &str = "app.bsky.video.getUploadLimits"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub can_upload: bool, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub error: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub message: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub remaining_daily_bytes: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub remaining_daily_videos: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/app/bsky/video/upload_video.rs b/crates/weaver-common/src/lexicons/app/bsky/video/upload_video.rs new file mode 100644 index 0000000..7106036 --- /dev/null +++ b/crates/weaver-common/src/lexicons/app/bsky/video/upload_video.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `app.bsky.video.uploadVideo` namespace. +pub const NSID: &str = "app.bsky.video.uploadVideo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub job_status: crate::app::bsky::video::defs::JobStatus, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat.rs b/crates/weaver-common/src/lexicons/chat.rs new file mode 100644 index 0000000..f0bc409 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat` namespace. +pub mod bsky; diff --git a/crates/weaver-common/src/lexicons/chat/bsky.rs b/crates/weaver-common/src/lexicons/chat/bsky.rs new file mode 100644 index 0000000..80593ff --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky.rs @@ -0,0 +1,5 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky` namespace. +pub mod actor; +pub mod convo; +pub mod moderation; diff --git a/crates/weaver-common/src/lexicons/chat/bsky/actor.rs b/crates/weaver-common/src/lexicons/chat/bsky/actor.rs new file mode 100644 index 0000000..ade7d25 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/actor.rs @@ -0,0 +1,6 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.actor` namespace. +pub mod declaration; +pub mod defs; +pub mod delete_account; +pub mod export_account_data; diff --git a/crates/weaver-common/src/lexicons/chat/bsky/actor/declaration.rs b/crates/weaver-common/src/lexicons/chat/bsky/actor/declaration.rs new file mode 100644 index 0000000..eacb2d8 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/actor/declaration.rs @@ -0,0 +1,14 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.actor.declaration` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub allow_incoming: String, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/actor/defs.rs b/crates/weaver-common/src/lexicons/chat/bsky/actor/defs.rs new file mode 100644 index 0000000..42d6404 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/actor/defs.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.actor.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProfileViewBasicData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub associated: core::option::Option< + crate::app::bsky::actor::defs::ProfileAssociated, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + ///Set to true when the actor cannot actively participate in conversations + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub chat_disabled: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, + pub handle: atrium_api::types::string::Handle, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verification: core::option::Option< + crate::app::bsky::actor::defs::VerificationState, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type ProfileViewBasic = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/chat/bsky/actor/delete_account.rs b/crates/weaver-common/src/lexicons/chat/bsky/actor/delete_account.rs new file mode 100644 index 0000000..24cc115 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/actor/delete_account.rs @@ -0,0 +1,15 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.actor.deleteAccount` namespace. +pub const NSID: &str = "chat.bsky.actor.deleteAccount"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData {} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/actor/export_account_data.rs b/crates/weaver-common/src/lexicons/chat/bsky/actor/export_account_data.rs new file mode 100644 index 0000000..1440a58 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/actor/export_account_data.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.actor.exportAccountData` namespace. +pub const NSID: &str = "chat.bsky.actor.exportAccountData"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo.rs new file mode 100644 index 0000000..03aeb02 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo.rs @@ -0,0 +1,20 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo` namespace. +pub mod accept_convo; +pub mod add_reaction; +pub mod defs; +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; diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/accept_convo.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/accept_convo.rs new file mode 100644 index 0000000..30cfd29 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/accept_convo.rs @@ -0,0 +1,25 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.acceptConvo` namespace. +pub const NSID: &str = "chat.bsky.convo.acceptConvo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub convo_id: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///Rev when the convo was accepted. If not present, the convo was already accepted. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rev: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/add_reaction.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/add_reaction.rs new file mode 100644 index 0000000..dd722ee --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/add_reaction.rs @@ -0,0 +1,52 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.addReaction` namespace. +pub const NSID: &str = "chat.bsky.convo.addReaction"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub convo_id: String, + pub message_id: String, + pub value: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub message: crate::chat::bsky::convo::defs::MessageView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///Indicates that the message has been deleted and reactions can no longer be added/removed. + ReactionMessageDeleted(Option), + ///Indicates that the message has the maximum number of reactions allowed for a single user, and the requested reaction wasn't yet present. If it was already present, the request will not fail since it is idempotent. + ReactionLimitReached(Option), + ///Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji. + ReactionInvalidValue(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::ReactionMessageDeleted(msg) => { + write!(_f, "ReactionMessageDeleted")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::ReactionLimitReached(msg) => { + write!(_f, "ReactionLimitReached")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::ReactionInvalidValue(msg) => { + write!(_f, "ReactionInvalidValue")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/defs.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/defs.rs new file mode 100644 index 0000000..78048b3 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/defs.rs @@ -0,0 +1,238 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ConvoViewData { + pub id: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub last_message: core::option::Option< + atrium_api::types::Union, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub last_reaction: core::option::Option< + atrium_api::types::Union, + >, + pub members: Vec, + pub muted: bool, + pub rev: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, + pub unread_count: i64, +} +pub type ConvoView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct DeletedMessageViewData { + pub id: String, + pub rev: String, + pub sender: MessageViewSender, + pub sent_at: atrium_api::types::string::Datetime, +} +pub type DeletedMessageView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogAcceptConvoData { + pub convo_id: String, + pub rev: String, +} +pub type LogAcceptConvo = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogAddReactionData { + pub convo_id: String, + pub message: atrium_api::types::Union, + pub reaction: ReactionView, + pub rev: String, +} +pub type LogAddReaction = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogBeginConvoData { + pub convo_id: String, + pub rev: String, +} +pub type LogBeginConvo = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogCreateMessageData { + pub convo_id: String, + pub message: atrium_api::types::Union, + pub rev: String, +} +pub type LogCreateMessage = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogDeleteMessageData { + pub convo_id: String, + pub message: atrium_api::types::Union, + pub rev: String, +} +pub type LogDeleteMessage = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogLeaveConvoData { + pub convo_id: String, + pub rev: String, +} +pub type LogLeaveConvo = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogMuteConvoData { + pub convo_id: String, + pub rev: String, +} +pub type LogMuteConvo = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogReadMessageData { + pub convo_id: String, + pub message: atrium_api::types::Union, + pub rev: String, +} +pub type LogReadMessage = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogRemoveReactionData { + pub convo_id: String, + pub message: atrium_api::types::Union, + pub reaction: ReactionView, + pub rev: String, +} +pub type LogRemoveReaction = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LogUnmuteConvoData { + pub convo_id: String, + pub rev: String, +} +pub type LogUnmuteConvo = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MessageAndReactionViewData { + pub message: MessageView, + pub reaction: ReactionView, +} +pub type MessageAndReactionView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MessageInputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embed: core::option::Option>, + ///Annotations of text (mentions, URLs, hashtags, etc) + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub facets: core::option::Option>, + pub text: String, +} +pub type MessageInput = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MessageRefData { + pub convo_id: String, + pub did: atrium_api::types::string::Did, + pub message_id: String, +} +pub type MessageRef = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MessageViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embed: core::option::Option>, + ///Annotations of text (mentions, URLs, hashtags, etc) + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub facets: core::option::Option>, + pub id: String, + ///Reactions to this message, in ascending order of creation time. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reactions: core::option::Option>, + pub rev: String, + pub sender: MessageViewSender, + pub sent_at: atrium_api::types::string::Datetime, + pub text: String, +} +pub type MessageView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MessageViewSenderData { + pub did: atrium_api::types::string::Did, +} +pub type MessageViewSender = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ReactionViewData { + pub created_at: atrium_api::types::string::Datetime, + pub sender: ReactionViewSender, + pub value: String, +} +pub type ReactionView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ReactionViewSenderData { + pub did: atrium_api::types::string::Did, +} +pub type ReactionViewSender = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ConvoViewLastMessageRefs { + #[serde(rename = "chat.bsky.convo.defs#messageView")] + MessageView(Box), + #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] + DeletedMessageView(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ConvoViewLastReactionRefs { + #[serde(rename = "chat.bsky.convo.defs#messageAndReactionView")] + MessageAndReactionView(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum LogAddReactionMessageRefs { + #[serde(rename = "chat.bsky.convo.defs#messageView")] + MessageView(Box), + #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] + DeletedMessageView(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum LogCreateMessageMessageRefs { + #[serde(rename = "chat.bsky.convo.defs#messageView")] + MessageView(Box), + #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] + DeletedMessageView(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum LogDeleteMessageMessageRefs { + #[serde(rename = "chat.bsky.convo.defs#messageView")] + MessageView(Box), + #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] + DeletedMessageView(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum LogReadMessageMessageRefs { + #[serde(rename = "chat.bsky.convo.defs#messageView")] + MessageView(Box), + #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] + DeletedMessageView(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum LogRemoveReactionMessageRefs { + #[serde(rename = "chat.bsky.convo.defs#messageView")] + MessageView(Box), + #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] + DeletedMessageView(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum MessageInputEmbedRefs { + #[serde(rename = "app.bsky.embed.record")] + AppBskyEmbedRecordMain(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum MessageViewEmbedRefs { + #[serde(rename = "app.bsky.embed.record#view")] + AppBskyEmbedRecordView(Box), +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/delete_message_for_self.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/delete_message_for_self.rs new file mode 100644 index 0000000..3e8d12c --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/delete_message_for_self.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.deleteMessageForSelf` namespace. +pub const NSID: &str = "chat.bsky.convo.deleteMessageForSelf"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub convo_id: String, + pub message_id: String, +} +pub type Input = atrium_api::types::Object; +pub type Output = crate::chat::bsky::convo::defs::DeletedMessageView; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/get_convo.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_convo.rs new file mode 100644 index 0000000..933756b --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_convo.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.getConvo` namespace. +pub const NSID: &str = "chat.bsky.convo.getConvo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub convo_id: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub convo: crate::chat::bsky::convo::defs::ConvoView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/get_convo_availability.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_convo_availability.rs new file mode 100644 index 0000000..9a082e0 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_convo_availability.rs @@ -0,0 +1,25 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.getConvoAvailability` namespace. +pub const NSID: &str = "chat.bsky.convo.getConvoAvailability"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub members: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub can_chat: bool, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub convo: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/get_convo_for_members.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_convo_for_members.rs new file mode 100644 index 0000000..2bc60cc --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_convo_for_members.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.getConvoForMembers` namespace. +pub const NSID: &str = "chat.bsky.convo.getConvoForMembers"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub members: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub convo: crate::chat::bsky::convo::defs::ConvoView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/get_log.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_log.rs new file mode 100644 index 0000000..7bcc58d --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_log.rs @@ -0,0 +1,56 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.getLog` namespace. +pub const NSID: &str = "chat.bsky.convo.getLog"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub logs: Vec>, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputLogsItem { + #[serde(rename = "chat.bsky.convo.defs#logBeginConvo")] + ChatBskyConvoDefsLogBeginConvo(Box), + #[serde(rename = "chat.bsky.convo.defs#logAcceptConvo")] + ChatBskyConvoDefsLogAcceptConvo(Box), + #[serde(rename = "chat.bsky.convo.defs#logLeaveConvo")] + ChatBskyConvoDefsLogLeaveConvo(Box), + #[serde(rename = "chat.bsky.convo.defs#logMuteConvo")] + ChatBskyConvoDefsLogMuteConvo(Box), + #[serde(rename = "chat.bsky.convo.defs#logUnmuteConvo")] + ChatBskyConvoDefsLogUnmuteConvo(Box), + #[serde(rename = "chat.bsky.convo.defs#logCreateMessage")] + ChatBskyConvoDefsLogCreateMessage( + Box, + ), + #[serde(rename = "chat.bsky.convo.defs#logDeleteMessage")] + ChatBskyConvoDefsLogDeleteMessage( + Box, + ), + #[serde(rename = "chat.bsky.convo.defs#logReadMessage")] + ChatBskyConvoDefsLogReadMessage(Box), + #[serde(rename = "chat.bsky.convo.defs#logAddReaction")] + ChatBskyConvoDefsLogAddReaction(Box), + #[serde(rename = "chat.bsky.convo.defs#logRemoveReaction")] + ChatBskyConvoDefsLogRemoveReaction( + Box, + ), +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/get_messages.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_messages.rs new file mode 100644 index 0000000..9e9b62e --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/get_messages.rs @@ -0,0 +1,39 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.getMessages` namespace. +pub const NSID: &str = "chat.bsky.convo.getMessages"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub convo_id: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub messages: Vec>, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputMessagesItem { + #[serde(rename = "chat.bsky.convo.defs#messageView")] + ChatBskyConvoDefsMessageView(Box), + #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] + ChatBskyConvoDefsDeletedMessageView( + Box, + ), +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/leave_convo.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/leave_convo.rs new file mode 100644 index 0000000..72f6750 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/leave_convo.rs @@ -0,0 +1,24 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.leaveConvo` namespace. +pub const NSID: &str = "chat.bsky.convo.leaveConvo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub convo_id: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub convo_id: String, + pub rev: String, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/list_convos.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/list_convos.rs new file mode 100644 index 0000000..ed5e0f7 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/list_convos.rs @@ -0,0 +1,32 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.listConvos` namespace. +pub const NSID: &str = "chat.bsky.convo.listConvos"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub read_state: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub convos: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/mute_convo.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/mute_convo.rs new file mode 100644 index 0000000..8fb6536 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/mute_convo.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.muteConvo` namespace. +pub const NSID: &str = "chat.bsky.convo.muteConvo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub convo_id: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub convo: crate::chat::bsky::convo::defs::ConvoView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/remove_reaction.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/remove_reaction.rs new file mode 100644 index 0000000..73290c6 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/remove_reaction.rs @@ -0,0 +1,44 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.removeReaction` namespace. +pub const NSID: &str = "chat.bsky.convo.removeReaction"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub convo_id: String, + pub message_id: String, + pub value: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub message: crate::chat::bsky::convo::defs::MessageView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///Indicates that the message has been deleted and reactions can no longer be added/removed. + ReactionMessageDeleted(Option), + ///Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji. + ReactionInvalidValue(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::ReactionMessageDeleted(msg) => { + write!(_f, "ReactionMessageDeleted")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::ReactionInvalidValue(msg) => { + write!(_f, "ReactionInvalidValue")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/send_message.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/send_message.rs new file mode 100644 index 0000000..11c84b4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/send_message.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.sendMessage` namespace. +pub const NSID: &str = "chat.bsky.convo.sendMessage"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub convo_id: String, + pub message: crate::chat::bsky::convo::defs::MessageInput, +} +pub type Input = atrium_api::types::Object; +pub type Output = crate::chat::bsky::convo::defs::MessageView; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/send_message_batch.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/send_message_batch.rs new file mode 100644 index 0000000..666f669 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/send_message_batch.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.sendMessageBatch` namespace. +pub const NSID: &str = "chat.bsky.convo.sendMessageBatch"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub items: Vec, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub items: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct BatchItemData { + pub convo_id: String, + pub message: crate::chat::bsky::convo::defs::MessageInput, +} +pub type BatchItem = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/unmute_convo.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/unmute_convo.rs new file mode 100644 index 0000000..3584ec8 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/unmute_convo.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.unmuteConvo` namespace. +pub const NSID: &str = "chat.bsky.convo.unmuteConvo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub convo_id: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub convo: crate::chat::bsky::convo::defs::ConvoView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/update_all_read.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/update_all_read.rs new file mode 100644 index 0000000..22d4f6a --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/update_all_read.rs @@ -0,0 +1,25 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.updateAllRead` namespace. +pub const NSID: &str = "chat.bsky.convo.updateAllRead"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///The count of updated convos. + pub updated_count: i64, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/convo/update_read.rs b/crates/weaver-common/src/lexicons/chat/bsky/convo/update_read.rs new file mode 100644 index 0000000..f93e32f --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/convo/update_read.rs @@ -0,0 +1,25 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.convo.updateRead` namespace. +pub const NSID: &str = "chat.bsky.convo.updateRead"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub convo_id: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub message_id: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub convo: crate::chat::bsky::convo::defs::ConvoView, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/moderation.rs b/crates/weaver-common/src/lexicons/chat/bsky/moderation.rs new file mode 100644 index 0000000..5225b27 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/moderation.rs @@ -0,0 +1,5 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.moderation` namespace. +pub mod get_actor_metadata; +pub mod get_message_context; +pub mod update_actor_access; diff --git a/crates/weaver-common/src/lexicons/chat/bsky/moderation/get_actor_metadata.rs b/crates/weaver-common/src/lexicons/chat/bsky/moderation/get_actor_metadata.rs new file mode 100644 index 0000000..88f99de --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/moderation/get_actor_metadata.rs @@ -0,0 +1,34 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.moderation.getActorMetadata` namespace. +pub const NSID: &str = "chat.bsky.moderation.getActorMetadata"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub actor: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub all: Metadata, + pub day: Metadata, + pub month: Metadata, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MetadataData { + pub convos: i64, + pub convos_started: i64, + pub messages_received: i64, + pub messages_sent: i64, +} +pub type Metadata = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/chat/bsky/moderation/get_message_context.rs b/crates/weaver-common/src/lexicons/chat/bsky/moderation/get_message_context.rs new file mode 100644 index 0000000..78c4939 --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/moderation/get_message_context.rs @@ -0,0 +1,40 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.moderation.getMessageContext` namespace. +pub const NSID: &str = "chat.bsky.moderation.getMessageContext"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub after: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub before: core::option::Option, + ///Conversation that the message is from. NOTE: this field will eventually be required. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub convo_id: core::option::Option, + pub message_id: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub messages: Vec>, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputMessagesItem { + #[serde(rename = "chat.bsky.convo.defs#messageView")] + ChatBskyConvoDefsMessageView(Box), + #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] + ChatBskyConvoDefsDeletedMessageView( + Box, + ), +} diff --git a/crates/weaver-common/src/lexicons/chat/bsky/moderation/update_actor_access.rs b/crates/weaver-common/src/lexicons/chat/bsky/moderation/update_actor_access.rs new file mode 100644 index 0000000..a32340b --- /dev/null +++ b/crates/weaver-common/src/lexicons/chat/bsky/moderation/update_actor_access.rs @@ -0,0 +1,20 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `chat.bsky.moderation.updateActorAccess` namespace. +pub const NSID: &str = "chat.bsky.moderation.updateActorAccess"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub actor: atrium_api::types::string::Did, + pub allow_access: bool, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub r#ref: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/client.rs b/crates/weaver-common/src/lexicons/client.rs new file mode 100644 index 0000000..c3f13a4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/client.rs @@ -0,0 +1,7022 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Structs for ATP client, implements all HTTP APIs of XRPC. +///Client struct for the ATP service. +pub struct AtpServiceClient +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + pub service: Service, +} +impl AtpServiceClient +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + pub fn new(xrpc: T) -> Self { + Self { + service: Service::new(std::sync::Arc::new(xrpc)), + } + } +} +pub struct Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + pub app: app::Service, + pub chat: chat::Service, + pub com: com::Service, + pub tools: tools::Service, + pub(crate) _phantom: core::marker::PhantomData, +} +pub mod app { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub bsky: bsky::Service, + pub(crate) _phantom: core::marker::PhantomData, + } + pub mod bsky { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub actor: actor::Service, + pub feed: feed::Service, + pub graph: graph::Service, + pub labeler: labeler::Service, + pub notification: notification::Service, + pub unspecced: unspecced::Service, + pub video: video::Service, + pub(crate) _phantom: core::marker::PhantomData, + } + pub mod actor { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod feed { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod graph { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod labeler { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod notification { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod unspecced { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod video { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + } +} +pub mod chat { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub bsky: bsky::Service, + pub(crate) _phantom: core::marker::PhantomData, + } + pub mod bsky { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub actor: actor::Service, + pub convo: convo::Service, + pub moderation: moderation::Service, + pub(crate) _phantom: core::marker::PhantomData, + } + pub mod actor { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod convo { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod moderation { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + } +} +pub mod com { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub atproto: atproto::Service, + pub(crate) _phantom: core::marker::PhantomData, + } + pub mod atproto { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub admin: admin::Service, + pub identity: identity::Service, + pub label: label::Service, + pub moderation: moderation::Service, + pub repo: repo::Service, + pub server: server::Service, + pub sync: sync::Service, + pub temp: temp::Service, + pub(crate) _phantom: core::marker::PhantomData, + } + pub mod admin { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod identity { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod label { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod moderation { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod repo { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod server { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod sync { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod temp { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + } +} +pub mod tools { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub ozone: ozone::Service, + pub(crate) _phantom: core::marker::PhantomData, + } + pub mod ozone { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub communication: communication::Service, + pub hosting: hosting::Service, + pub moderation: moderation::Service, + pub server: server::Service, + pub set: set::Service, + pub setting: setting::Service, + pub signature: signature::Service, + pub team: team::Service, + pub verification: verification::Service, + pub(crate) _phantom: core::marker::PhantomData, + } + pub mod communication { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod hosting { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod moderation { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod server { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod set { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod setting { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod signature { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod team { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + pub mod verification { + pub struct Service + where + T: atrium_xrpc::XrpcClient + Send + Sync, + { + pub(crate) xrpc: std::sync::Arc, + pub(crate) _phantom: core::marker::PhantomData, + } + } + } +} +impl self::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + app: app::Service::new(std::sync::Arc::clone(&xrpc)), + chat: chat::Service::new(std::sync::Arc::clone(&xrpc)), + com: com::Service::new(std::sync::Arc::clone(&xrpc)), + tools: tools::Service::new(std::sync::Arc::clone(&xrpc)), + _phantom: core::marker::PhantomData, + } + } +} +impl app::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + bsky: app::bsky::Service::new(std::sync::Arc::clone(&xrpc)), + _phantom: core::marker::PhantomData, + } + } +} +impl app::bsky::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + actor: app::bsky::actor::Service::new(std::sync::Arc::clone(&xrpc)), + feed: app::bsky::feed::Service::new(std::sync::Arc::clone(&xrpc)), + graph: app::bsky::graph::Service::new(std::sync::Arc::clone(&xrpc)), + labeler: app::bsky::labeler::Service::new(std::sync::Arc::clone(&xrpc)), + notification: app::bsky::notification::Service::new( + std::sync::Arc::clone(&xrpc), + ), + unspecced: app::bsky::unspecced::Service::new(std::sync::Arc::clone(&xrpc)), + video: app::bsky::video::Service::new(std::sync::Arc::clone(&xrpc)), + _phantom: core::marker::PhantomData, + } + } +} +impl app::bsky::actor::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. + pub async fn get_preferences( + &self, + params: crate::app::bsky::actor::get_preferences::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::actor::get_preferences::Output, + crate::app::bsky::actor::get_preferences::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::actor::get_preferences::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. + pub async fn get_profile( + &self, + params: crate::app::bsky::actor::get_profile::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::actor::get_profile::Output, + crate::app::bsky::actor::get_profile::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::actor::get_profile::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get detailed profile views of multiple actors. + pub async fn get_profiles( + &self, + params: crate::app::bsky::actor::get_profiles::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::actor::get_profiles::Output, + crate::app::bsky::actor::get_profiles::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::actor::get_profiles::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding. + pub async fn get_suggestions( + &self, + params: crate::app::bsky::actor::get_suggestions::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::actor::get_suggestions::Output, + crate::app::bsky::actor::get_suggestions::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::actor::get_suggestions::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Set the private preferences attached to the account. + pub async fn put_preferences( + &self, + input: crate::app::bsky::actor::put_preferences::Input, + ) -> atrium_xrpc::Result<(), crate::app::bsky::actor::put_preferences::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::actor::put_preferences::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Find actors (profiles) matching search criteria. Does not require auth. + pub async fn search_actors( + &self, + params: crate::app::bsky::actor::search_actors::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::actor::search_actors::Output, + crate::app::bsky::actor::search_actors::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::actor::search_actors::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth. + pub async fn search_actors_typeahead( + &self, + params: crate::app::bsky::actor::search_actors_typeahead::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::actor::search_actors_typeahead::Output, + crate::app::bsky::actor::search_actors_typeahead::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::actor::search_actors_typeahead::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl app::bsky::feed::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). + pub async fn describe_feed_generator( + &self, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::describe_feed_generator::Output, + crate::app::bsky::feed::describe_feed_generator::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::describe_feed_generator::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of feeds (feed generator records) created by the actor (in the actor's repo). + pub async fn get_actor_feeds( + &self, + params: crate::app::bsky::feed::get_actor_feeds::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_actor_feeds::Output, + crate::app::bsky::feed::get_actor_feeds::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_actor_feeds::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. + pub async fn get_actor_likes( + &self, + params: crate::app::bsky::feed::get_actor_likes::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_actor_likes::Output, + crate::app::bsky::feed::get_actor_likes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_actor_likes::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. + pub async fn get_author_feed( + &self, + params: crate::app::bsky::feed::get_author_feed::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_author_feed::Output, + crate::app::bsky::feed::get_author_feed::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_author_feed::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a hydrated feed from an actor's selected feed generator. Implemented by App View. + pub async fn get_feed( + &self, + params: crate::app::bsky::feed::get_feed::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_feed::Output, + crate::app::bsky::feed::get_feed::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_feed::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get information about a feed generator. Implemented by AppView. + pub async fn get_feed_generator( + &self, + params: crate::app::bsky::feed::get_feed_generator::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_feed_generator::Output, + crate::app::bsky::feed::get_feed_generator::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_feed_generator::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get information about a list of feed generators. + pub async fn get_feed_generators( + &self, + params: crate::app::bsky::feed::get_feed_generators::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_feed_generators::Output, + crate::app::bsky::feed::get_feed_generators::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_feed_generators::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service. + pub async fn get_feed_skeleton( + &self, + params: crate::app::bsky::feed::get_feed_skeleton::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_feed_skeleton::Output, + crate::app::bsky::feed::get_feed_skeleton::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_feed_skeleton::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get like records which reference a subject (by AT-URI and CID). + pub async fn get_likes( + &self, + params: crate::app::bsky::feed::get_likes::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_likes::Output, + crate::app::bsky::feed::get_likes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_likes::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth. + pub async fn get_list_feed( + &self, + params: crate::app::bsky::feed::get_list_feed::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_list_feed::Output, + crate::app::bsky::feed::get_list_feed::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_list_feed::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. + pub async fn get_post_thread( + &self, + params: crate::app::bsky::feed::get_post_thread::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_post_thread::Output, + crate::app::bsky::feed::get_post_thread::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_post_thread::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. + pub async fn get_posts( + &self, + params: crate::app::bsky::feed::get_posts::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_posts::Output, + crate::app::bsky::feed::get_posts::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_posts::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of quotes for a given post. + pub async fn get_quotes( + &self, + params: crate::app::bsky::feed::get_quotes::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_quotes::Output, + crate::app::bsky::feed::get_quotes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_quotes::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of reposts for a given post. + pub async fn get_reposted_by( + &self, + params: crate::app::bsky::feed::get_reposted_by::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_reposted_by::Output, + crate::app::bsky::feed::get_reposted_by::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_reposted_by::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of suggested feeds (feed generators) for the requesting account. + pub async fn get_suggested_feeds( + &self, + params: crate::app::bsky::feed::get_suggested_feeds::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_suggested_feeds::Output, + crate::app::bsky::feed::get_suggested_feeds::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_suggested_feeds::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. + pub async fn get_timeline( + &self, + params: crate::app::bsky::feed::get_timeline::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::get_timeline::Output, + crate::app::bsky::feed::get_timeline::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::get_timeline::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Find posts matching search criteria, returning views of those posts. + pub async fn search_posts( + &self, + params: crate::app::bsky::feed::search_posts::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::search_posts::Output, + crate::app::bsky::feed::search_posts::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::feed::search_posts::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Send information about interactions with feed items back to the feed generator that served them. + pub async fn send_interactions( + &self, + input: crate::app::bsky::feed::send_interactions::Input, + ) -> atrium_xrpc::Result< + crate::app::bsky::feed::send_interactions::Output, + crate::app::bsky::feed::send_interactions::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::feed::send_interactions::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl app::bsky::graph::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Get a list of starter packs created by the actor. + pub async fn get_actor_starter_packs( + &self, + params: crate::app::bsky::graph::get_actor_starter_packs::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_actor_starter_packs::Output, + crate::app::bsky::graph::get_actor_starter_packs::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_actor_starter_packs::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates which accounts the requesting account is currently blocking. Requires auth. + pub async fn get_blocks( + &self, + params: crate::app::bsky::graph::get_blocks::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_blocks::Output, + crate::app::bsky::graph::get_blocks::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_blocks::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates accounts which follow a specified account (actor). + pub async fn get_followers( + &self, + params: crate::app::bsky::graph::get_followers::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_followers::Output, + crate::app::bsky::graph::get_followers::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_followers::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates accounts which a specified account (actor) follows. + pub async fn get_follows( + &self, + params: crate::app::bsky::graph::get_follows::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_follows::Output, + crate::app::bsky::graph::get_follows::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_follows::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates accounts which follow a specified account (actor) and are followed by the viewer. + pub async fn get_known_followers( + &self, + params: crate::app::bsky::graph::get_known_followers::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_known_followers::Output, + crate::app::bsky::graph::get_known_followers::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_known_followers::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Gets a 'view' (with additional context) of a specified list. + pub async fn get_list( + &self, + params: crate::app::bsky::graph::get_list::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_list::Output, + crate::app::bsky::graph::get_list::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_list::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get mod lists that the requesting account (actor) is blocking. Requires auth. + pub async fn get_list_blocks( + &self, + params: crate::app::bsky::graph::get_list_blocks::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_list_blocks::Output, + crate::app::bsky::graph::get_list_blocks::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_list_blocks::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. + pub async fn get_list_mutes( + &self, + params: crate::app::bsky::graph::get_list_mutes::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_list_mutes::Output, + crate::app::bsky::graph::get_list_mutes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_list_mutes::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates the lists created by a specified account (actor). + pub async fn get_lists( + &self, + params: crate::app::bsky::graph::get_lists::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_lists::Output, + crate::app::bsky::graph::get_lists::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_lists::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. + pub async fn get_mutes( + &self, + params: crate::app::bsky::graph::get_mutes::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_mutes::Output, + crate::app::bsky::graph::get_mutes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_mutes::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates public relationships between one account, and a list of other accounts. Does not require auth. + pub async fn get_relationships( + &self, + params: crate::app::bsky::graph::get_relationships::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_relationships::Output, + crate::app::bsky::graph::get_relationships::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_relationships::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Gets a view of a starter pack. + pub async fn get_starter_pack( + &self, + params: crate::app::bsky::graph::get_starter_pack::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_starter_pack::Output, + crate::app::bsky::graph::get_starter_pack::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_starter_pack::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get views for a list of starter packs. + pub async fn get_starter_packs( + &self, + params: crate::app::bsky::graph::get_starter_packs::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_starter_packs::Output, + crate::app::bsky::graph::get_starter_packs::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_starter_packs::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. + pub async fn get_suggested_follows_by_actor( + &self, + params: crate::app::bsky::graph::get_suggested_follows_by_actor::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::get_suggested_follows_by_actor::Output, + crate::app::bsky::graph::get_suggested_follows_by_actor::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::get_suggested_follows_by_actor::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. + pub async fn mute_actor( + &self, + input: crate::app::bsky::graph::mute_actor::Input, + ) -> atrium_xrpc::Result<(), crate::app::bsky::graph::mute_actor::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::graph::mute_actor::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth. + pub async fn mute_actor_list( + &self, + input: crate::app::bsky::graph::mute_actor_list::Input, + ) -> atrium_xrpc::Result<(), crate::app::bsky::graph::mute_actor_list::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::graph::mute_actor_list::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth. + pub async fn mute_thread( + &self, + input: crate::app::bsky::graph::mute_thread::Input, + ) -> atrium_xrpc::Result<(), crate::app::bsky::graph::mute_thread::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::graph::mute_thread::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Find starter packs matching search criteria. Does not require auth. + pub async fn search_starter_packs( + &self, + params: crate::app::bsky::graph::search_starter_packs::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::graph::search_starter_packs::Output, + crate::app::bsky::graph::search_starter_packs::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::graph::search_starter_packs::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Unmutes the specified account. Requires auth. + pub async fn unmute_actor( + &self, + input: crate::app::bsky::graph::unmute_actor::Input, + ) -> atrium_xrpc::Result<(), crate::app::bsky::graph::unmute_actor::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::graph::unmute_actor::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Unmutes the specified list of accounts. Requires auth. + pub async fn unmute_actor_list( + &self, + input: crate::app::bsky::graph::unmute_actor_list::Input, + ) -> atrium_xrpc::Result<(), crate::app::bsky::graph::unmute_actor_list::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::graph::unmute_actor_list::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Unmutes the specified thread. Requires auth. + pub async fn unmute_thread( + &self, + input: crate::app::bsky::graph::unmute_thread::Input, + ) -> atrium_xrpc::Result<(), crate::app::bsky::graph::unmute_thread::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::graph::unmute_thread::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl app::bsky::labeler::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Get information about a list of labeler services. + pub async fn get_services( + &self, + params: crate::app::bsky::labeler::get_services::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::labeler::get_services::Output, + crate::app::bsky::labeler::get_services::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::labeler::get_services::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl app::bsky::notification::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Count the number of unread notifications for the requesting account. Requires auth. + pub async fn get_unread_count( + &self, + params: crate::app::bsky::notification::get_unread_count::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::notification::get_unread_count::Output, + crate::app::bsky::notification::get_unread_count::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::notification::get_unread_count::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerate notifications for the requesting account. Requires auth. + pub async fn list_notifications( + &self, + params: crate::app::bsky::notification::list_notifications::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::notification::list_notifications::Output, + crate::app::bsky::notification::list_notifications::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::notification::list_notifications::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Set notification-related preferences for an account. Requires auth. + pub async fn put_preferences( + &self, + input: crate::app::bsky::notification::put_preferences::Input, + ) -> atrium_xrpc::Result< + (), + crate::app::bsky::notification::put_preferences::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::notification::put_preferences::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Register to receive push notifications, via a specified service, for the requesting account. Requires auth. + pub async fn register_push( + &self, + input: crate::app::bsky::notification::register_push::Input, + ) -> atrium_xrpc::Result<(), crate::app::bsky::notification::register_push::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::notification::register_push::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Notify server that the requesting account has seen notifications. Requires auth. + pub async fn update_seen( + &self, + input: crate::app::bsky::notification::update_seen::Input, + ) -> atrium_xrpc::Result<(), crate::app::bsky::notification::update_seen::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::notification::update_seen::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl app::bsky::unspecced::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Get miscellaneous runtime configuration. + pub async fn get_config( + &self, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_config::Output, + crate::app::bsky::unspecced::get_config::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_config::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///An unspecced view of globally popular feed generators. + pub async fn get_popular_feed_generators( + &self, + params: crate::app::bsky::unspecced::get_popular_feed_generators::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_popular_feed_generators::Output, + crate::app::bsky::unspecced::get_popular_feed_generators::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_popular_feed_generators::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of suggested feeds + pub async fn get_suggested_feeds( + &self, + params: crate::app::bsky::unspecced::get_suggested_feeds::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_suggested_feeds::Output, + crate::app::bsky::unspecced::get_suggested_feeds::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_suggested_feeds::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds + pub async fn get_suggested_feeds_skeleton( + &self, + params: crate::app::bsky::unspecced::get_suggested_feeds_skeleton::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_suggested_feeds_skeleton::Output, + crate::app::bsky::unspecced::get_suggested_feeds_skeleton::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_suggested_feeds_skeleton::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of suggested starterpacks + pub async fn get_suggested_starter_packs( + &self, + params: crate::app::bsky::unspecced::get_suggested_starter_packs::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_suggested_starter_packs::Output, + crate::app::bsky::unspecced::get_suggested_starter_packs::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_suggested_starter_packs::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks + pub async fn get_suggested_starter_packs_skeleton( + &self, + params: crate::app::bsky::unspecced::get_suggested_starter_packs_skeleton::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_suggested_starter_packs_skeleton::Output, + crate::app::bsky::unspecced::get_suggested_starter_packs_skeleton::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_suggested_starter_packs_skeleton::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of suggested users + pub async fn get_suggested_users( + &self, + params: crate::app::bsky::unspecced::get_suggested_users::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_suggested_users::Output, + crate::app::bsky::unspecced::get_suggested_users::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_suggested_users::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers + pub async fn get_suggested_users_skeleton( + &self, + params: crate::app::bsky::unspecced::get_suggested_users_skeleton::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_suggested_users_skeleton::Output, + crate::app::bsky::unspecced::get_suggested_users_skeleton::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_suggested_users_skeleton::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions + pub async fn get_suggestions_skeleton( + &self, + params: crate::app::bsky::unspecced::get_suggestions_skeleton::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_suggestions_skeleton::Output, + crate::app::bsky::unspecced::get_suggestions_skeleton::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_suggestions_skeleton::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of suggestions (feeds and users) tagged with categories + pub async fn get_tagged_suggestions( + &self, + params: crate::app::bsky::unspecced::get_tagged_suggestions::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_tagged_suggestions::Output, + crate::app::bsky::unspecced::get_tagged_suggestions::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_tagged_suggestions::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a list of trending topics + pub async fn get_trending_topics( + &self, + params: crate::app::bsky::unspecced::get_trending_topics::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_trending_topics::Output, + crate::app::bsky::unspecced::get_trending_topics::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_trending_topics::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get the current trends on the network + pub async fn get_trends( + &self, + params: crate::app::bsky::unspecced::get_trends::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_trends::Output, + crate::app::bsky::unspecced::get_trends::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_trends::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends + pub async fn get_trends_skeleton( + &self, + params: crate::app::bsky::unspecced::get_trends_skeleton::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::get_trends_skeleton::Output, + crate::app::bsky::unspecced::get_trends_skeleton::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::get_trends_skeleton::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Backend Actors (profile) search, returns only skeleton. + pub async fn search_actors_skeleton( + &self, + params: crate::app::bsky::unspecced::search_actors_skeleton::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::search_actors_skeleton::Output, + crate::app::bsky::unspecced::search_actors_skeleton::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::search_actors_skeleton::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Backend Posts search, returns only skeleton + pub async fn search_posts_skeleton( + &self, + params: crate::app::bsky::unspecced::search_posts_skeleton::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::search_posts_skeleton::Output, + crate::app::bsky::unspecced::search_posts_skeleton::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::search_posts_skeleton::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Backend Starter Pack search, returns only skeleton. + pub async fn search_starter_packs_skeleton( + &self, + params: crate::app::bsky::unspecced::search_starter_packs_skeleton::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::unspecced::search_starter_packs_skeleton::Output, + crate::app::bsky::unspecced::search_starter_packs_skeleton::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::unspecced::search_starter_packs_skeleton::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl app::bsky::video::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Get status details for a video processing job. + pub async fn get_job_status( + &self, + params: crate::app::bsky::video::get_job_status::Parameters, + ) -> atrium_xrpc::Result< + crate::app::bsky::video::get_job_status::Output, + crate::app::bsky::video::get_job_status::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::video::get_job_status::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get video upload limits for the authenticated user. + pub async fn get_upload_limits( + &self, + ) -> atrium_xrpc::Result< + crate::app::bsky::video::get_upload_limits::Output, + crate::app::bsky::video::get_upload_limits::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::app::bsky::video::get_upload_limits::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Upload a video to be processed then stored on the PDS. + pub async fn upload_video( + &self, + input: Vec, + ) -> atrium_xrpc::Result< + crate::app::bsky::video::upload_video::Output, + crate::app::bsky::video::upload_video::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + Vec, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::app::bsky::video::upload_video::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Bytes(input)), + encoding: Some(String::from("video/mp4")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl chat::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + bsky: chat::bsky::Service::new(std::sync::Arc::clone(&xrpc)), + _phantom: core::marker::PhantomData, + } + } +} +impl chat::bsky::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + actor: chat::bsky::actor::Service::new(std::sync::Arc::clone(&xrpc)), + convo: chat::bsky::convo::Service::new(std::sync::Arc::clone(&xrpc)), + moderation: chat::bsky::moderation::Service::new( + std::sync::Arc::clone(&xrpc), + ), + _phantom: core::marker::PhantomData, + } + } +} +impl chat::bsky::actor::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + pub async fn delete_account( + &self, + ) -> atrium_xrpc::Result< + crate::chat::bsky::actor::delete_account::Output, + crate::chat::bsky::actor::delete_account::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::actor::delete_account::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn export_account_data( + &self, + ) -> atrium_xrpc::Result< + Vec, + crate::chat::bsky::actor::export_account_data::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::chat::bsky::actor::export_account_data::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(bytes) => Ok(bytes), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl chat::bsky::convo::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + pub async fn accept_convo( + &self, + input: crate::chat::bsky::convo::accept_convo::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::accept_convo::Output, + crate::chat::bsky::convo::accept_convo::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::accept_convo::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction. + pub async fn add_reaction( + &self, + input: crate::chat::bsky::convo::add_reaction::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::add_reaction::Output, + crate::chat::bsky::convo::add_reaction::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::add_reaction::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn delete_message_for_self( + &self, + input: crate::chat::bsky::convo::delete_message_for_self::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::delete_message_for_self::Output, + crate::chat::bsky::convo::delete_message_for_self::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::delete_message_for_self::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn get_convo( + &self, + params: crate::chat::bsky::convo::get_convo::Parameters, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::get_convo::Output, + crate::chat::bsky::convo::get_convo::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::chat::bsky::convo::get_convo::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned. + pub async fn get_convo_availability( + &self, + params: crate::chat::bsky::convo::get_convo_availability::Parameters, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::get_convo_availability::Output, + crate::chat::bsky::convo::get_convo_availability::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::chat::bsky::convo::get_convo_availability::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn get_convo_for_members( + &self, + params: crate::chat::bsky::convo::get_convo_for_members::Parameters, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::get_convo_for_members::Output, + crate::chat::bsky::convo::get_convo_for_members::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::chat::bsky::convo::get_convo_for_members::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn get_log( + &self, + params: crate::chat::bsky::convo::get_log::Parameters, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::get_log::Output, + crate::chat::bsky::convo::get_log::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::chat::bsky::convo::get_log::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn get_messages( + &self, + params: crate::chat::bsky::convo::get_messages::Parameters, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::get_messages::Output, + crate::chat::bsky::convo::get_messages::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::chat::bsky::convo::get_messages::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn leave_convo( + &self, + input: crate::chat::bsky::convo::leave_convo::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::leave_convo::Output, + crate::chat::bsky::convo::leave_convo::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::leave_convo::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn list_convos( + &self, + params: crate::chat::bsky::convo::list_convos::Parameters, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::list_convos::Output, + crate::chat::bsky::convo::list_convos::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::chat::bsky::convo::list_convos::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn mute_convo( + &self, + input: crate::chat::bsky::convo::mute_convo::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::mute_convo::Output, + crate::chat::bsky::convo::mute_convo::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::mute_convo::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't. + pub async fn remove_reaction( + &self, + input: crate::chat::bsky::convo::remove_reaction::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::remove_reaction::Output, + crate::chat::bsky::convo::remove_reaction::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::remove_reaction::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn send_message( + &self, + input: crate::chat::bsky::convo::send_message::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::send_message::Output, + crate::chat::bsky::convo::send_message::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::send_message::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn send_message_batch( + &self, + input: crate::chat::bsky::convo::send_message_batch::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::send_message_batch::Output, + crate::chat::bsky::convo::send_message_batch::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::send_message_batch::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn unmute_convo( + &self, + input: crate::chat::bsky::convo::unmute_convo::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::unmute_convo::Output, + crate::chat::bsky::convo::unmute_convo::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::unmute_convo::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn update_all_read( + &self, + input: crate::chat::bsky::convo::update_all_read::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::update_all_read::Output, + crate::chat::bsky::convo::update_all_read::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::update_all_read::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn update_read( + &self, + input: crate::chat::bsky::convo::update_read::Input, + ) -> atrium_xrpc::Result< + crate::chat::bsky::convo::update_read::Output, + crate::chat::bsky::convo::update_read::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::convo::update_read::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl chat::bsky::moderation::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + pub async fn get_actor_metadata( + &self, + params: crate::chat::bsky::moderation::get_actor_metadata::Parameters, + ) -> atrium_xrpc::Result< + crate::chat::bsky::moderation::get_actor_metadata::Output, + crate::chat::bsky::moderation::get_actor_metadata::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::chat::bsky::moderation::get_actor_metadata::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn get_message_context( + &self, + params: crate::chat::bsky::moderation::get_message_context::Parameters, + ) -> atrium_xrpc::Result< + crate::chat::bsky::moderation::get_message_context::Output, + crate::chat::bsky::moderation::get_message_context::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::chat::bsky::moderation::get_message_context::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + pub async fn update_actor_access( + &self, + input: crate::chat::bsky::moderation::update_actor_access::Input, + ) -> atrium_xrpc::Result< + (), + crate::chat::bsky::moderation::update_actor_access::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::chat::bsky::moderation::update_actor_access::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl com::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + atproto: com::atproto::Service::new(std::sync::Arc::clone(&xrpc)), + _phantom: core::marker::PhantomData, + } + } +} +impl com::atproto::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + admin: com::atproto::admin::Service::new(std::sync::Arc::clone(&xrpc)), + identity: com::atproto::identity::Service::new(std::sync::Arc::clone(&xrpc)), + label: com::atproto::label::Service::new(std::sync::Arc::clone(&xrpc)), + moderation: com::atproto::moderation::Service::new( + std::sync::Arc::clone(&xrpc), + ), + repo: com::atproto::repo::Service::new(std::sync::Arc::clone(&xrpc)), + server: com::atproto::server::Service::new(std::sync::Arc::clone(&xrpc)), + sync: com::atproto::sync::Service::new(std::sync::Arc::clone(&xrpc)), + temp: com::atproto::temp::Service::new(std::sync::Arc::clone(&xrpc)), + _phantom: core::marker::PhantomData, + } + } +} +impl com::atproto::admin::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Delete a user account as an administrator. + pub async fn delete_account( + &self, + input: crate::com::atproto::admin::delete_account::Input, + ) -> atrium_xrpc::Result<(), crate::com::atproto::admin::delete_account::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::delete_account::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Disable an account from receiving new invite codes, but does not invalidate existing codes. + pub async fn disable_account_invites( + &self, + input: crate::com::atproto::admin::disable_account_invites::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::admin::disable_account_invites::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::disable_account_invites::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Disable some set of codes and/or all codes associated with a set of users. + pub async fn disable_invite_codes( + &self, + input: crate::com::atproto::admin::disable_invite_codes::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::admin::disable_invite_codes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::disable_invite_codes::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Re-enable an account's ability to receive invite codes. + pub async fn enable_account_invites( + &self, + input: crate::com::atproto::admin::enable_account_invites::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::admin::enable_account_invites::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::enable_account_invites::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get details about an account. + pub async fn get_account_info( + &self, + params: crate::com::atproto::admin::get_account_info::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::admin::get_account_info::Output, + crate::com::atproto::admin::get_account_info::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::admin::get_account_info::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get details about some accounts. + pub async fn get_account_infos( + &self, + params: crate::com::atproto::admin::get_account_infos::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::admin::get_account_infos::Output, + crate::com::atproto::admin::get_account_infos::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::admin::get_account_infos::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get an admin view of invite codes. + pub async fn get_invite_codes( + &self, + params: crate::com::atproto::admin::get_invite_codes::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::admin::get_invite_codes::Output, + crate::com::atproto::admin::get_invite_codes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::admin::get_invite_codes::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get the service-specific admin status of a subject (account, record, or blob). + pub async fn get_subject_status( + &self, + params: crate::com::atproto::admin::get_subject_status::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::admin::get_subject_status::Output, + crate::com::atproto::admin::get_subject_status::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::admin::get_subject_status::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get list of accounts that matches your search query. + pub async fn search_accounts( + &self, + params: crate::com::atproto::admin::search_accounts::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::admin::search_accounts::Output, + crate::com::atproto::admin::search_accounts::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::admin::search_accounts::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Send email to a user's account email address. + pub async fn send_email( + &self, + input: crate::com::atproto::admin::send_email::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::admin::send_email::Output, + crate::com::atproto::admin::send_email::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::send_email::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Administrative action to update an account's email. + pub async fn update_account_email( + &self, + input: crate::com::atproto::admin::update_account_email::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::admin::update_account_email::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::update_account_email::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Administrative action to update an account's handle. + pub async fn update_account_handle( + &self, + input: crate::com::atproto::admin::update_account_handle::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::admin::update_account_handle::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::update_account_handle::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Update the password for a user account as an administrator. + pub async fn update_account_password( + &self, + input: crate::com::atproto::admin::update_account_password::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::admin::update_account_password::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::update_account_password::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Administrative action to update an account's signing key in their Did document. + pub async fn update_account_signing_key( + &self, + input: crate::com::atproto::admin::update_account_signing_key::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::admin::update_account_signing_key::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::update_account_signing_key::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Update the service-specific admin status of a subject (account, record, or blob). + pub async fn update_subject_status( + &self, + input: crate::com::atproto::admin::update_subject_status::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::admin::update_subject_status::Output, + crate::com::atproto::admin::update_subject_status::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::admin::update_subject_status::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl com::atproto::identity::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Describe the credentials that should be included in the DID doc of an account that is migrating to this service. + pub async fn get_recommended_did_credentials( + &self, + ) -> atrium_xrpc::Result< + crate::com::atproto::identity::get_recommended_did_credentials::Output, + crate::com::atproto::identity::get_recommended_did_credentials::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::identity::get_recommended_did_credentials::NSID + .into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server. + pub async fn refresh_identity( + &self, + input: crate::com::atproto::identity::refresh_identity::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::identity::refresh_identity::Output, + crate::com::atproto::identity::refresh_identity::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::identity::refresh_identity::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Request an email with a code to in order to request a signed PLC operation. Requires Auth. + pub async fn request_plc_operation_signature( + &self, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::identity::request_plc_operation_signature::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::identity::request_plc_operation_signature::NSID + .into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Resolves DID to DID document. Does not bi-directionally verify handle. + pub async fn resolve_did( + &self, + params: crate::com::atproto::identity::resolve_did::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::identity::resolve_did::Output, + crate::com::atproto::identity::resolve_did::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::identity::resolve_did::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document. + pub async fn resolve_handle( + &self, + params: crate::com::atproto::identity::resolve_handle::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::identity::resolve_handle::Output, + crate::com::atproto::identity::resolve_handle::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::identity::resolve_handle::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Resolves an identity (DID or Handle) to a full identity (DID document and verified handle). + pub async fn resolve_identity( + &self, + params: crate::com::atproto::identity::resolve_identity::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::identity::resolve_identity::Output, + crate::com::atproto::identity::resolve_identity::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::identity::resolve_identity::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Signs a PLC operation to update some value(s) in the requesting DID's document. + pub async fn sign_plc_operation( + &self, + input: crate::com::atproto::identity::sign_plc_operation::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::identity::sign_plc_operation::Output, + crate::com::atproto::identity::sign_plc_operation::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::identity::sign_plc_operation::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry + pub async fn submit_plc_operation( + &self, + input: crate::com::atproto::identity::submit_plc_operation::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::identity::submit_plc_operation::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::identity::submit_plc_operation::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth. + pub async fn update_handle( + &self, + input: crate::com::atproto::identity::update_handle::Input, + ) -> atrium_xrpc::Result<(), crate::com::atproto::identity::update_handle::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::identity::update_handle::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl com::atproto::label::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth. + pub async fn query_labels( + &self, + params: crate::com::atproto::label::query_labels::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::label::query_labels::Output, + crate::com::atproto::label::query_labels::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::label::query_labels::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl com::atproto::moderation::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth. + pub async fn create_report( + &self, + input: crate::com::atproto::moderation::create_report::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::moderation::create_report::Output, + crate::com::atproto::moderation::create_report::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::moderation::create_report::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl com::atproto::repo::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS. + pub async fn apply_writes( + &self, + input: crate::com::atproto::repo::apply_writes::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::repo::apply_writes::Output, + crate::com::atproto::repo::apply_writes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::repo::apply_writes::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Create a single new repository record. Requires auth, implemented by PDS. + pub async fn create_record( + &self, + input: crate::com::atproto::repo::create_record::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::repo::create_record::Output, + crate::com::atproto::repo::create_record::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::repo::create_record::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. + pub async fn delete_record( + &self, + input: crate::com::atproto::repo::delete_record::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::repo::delete_record::Output, + crate::com::atproto::repo::delete_record::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::repo::delete_record::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get information about an account and repository, including the list of collections. Does not require auth. + pub async fn describe_repo( + &self, + params: crate::com::atproto::repo::describe_repo::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::repo::describe_repo::Output, + crate::com::atproto::repo::describe_repo::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::repo::describe_repo::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a single record from a repository. Does not require auth. + pub async fn get_record( + &self, + params: crate::com::atproto::repo::get_record::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::repo::get_record::Output, + crate::com::atproto::repo::get_record::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::repo::get_record::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set. + pub async fn import_repo( + &self, + input: Vec, + ) -> atrium_xrpc::Result<(), crate::com::atproto::repo::import_repo::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + Vec, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::repo::import_repo::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Bytes(input)), + encoding: Some(String::from("application/vnd.ipld.car")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow. + pub async fn list_missing_blobs( + &self, + params: crate::com::atproto::repo::list_missing_blobs::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::repo::list_missing_blobs::Output, + crate::com::atproto::repo::list_missing_blobs::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::repo::list_missing_blobs::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///List a range of records in a repository, matching a specific collection. Does not require auth. + pub async fn list_records( + &self, + params: crate::com::atproto::repo::list_records::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::repo::list_records::Output, + crate::com::atproto::repo::list_records::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::repo::list_records::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. + pub async fn put_record( + &self, + input: crate::com::atproto::repo::put_record::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::repo::put_record::Output, + crate::com::atproto::repo::put_record::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::repo::put_record::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS. + pub async fn upload_blob( + &self, + input: Vec, + ) -> atrium_xrpc::Result< + crate::com::atproto::repo::upload_blob::Output, + crate::com::atproto::repo::upload_blob::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + Vec, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::repo::upload_blob::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Bytes(input)), + encoding: Some(String::from("*/*")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl com::atproto::server::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup. + pub async fn activate_account( + &self, + ) -> atrium_xrpc::Result<(), crate::com::atproto::server::activate_account::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::activate_account::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself. + pub async fn check_account_status( + &self, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::check_account_status::Output, + crate::com::atproto::server::check_account_status::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::server::check_account_status::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Confirm an email using a token from com.atproto.server.requestEmailConfirmation. + pub async fn confirm_email( + &self, + input: crate::com::atproto::server::confirm_email::Input, + ) -> atrium_xrpc::Result<(), crate::com::atproto::server::confirm_email::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::confirm_email::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Create an account. Implemented by PDS. + pub async fn create_account( + &self, + input: crate::com::atproto::server::create_account::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::create_account::Output, + crate::com::atproto::server::create_account::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::create_account::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Create an App Password. + pub async fn create_app_password( + &self, + input: crate::com::atproto::server::create_app_password::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::create_app_password::Output, + crate::com::atproto::server::create_app_password::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::create_app_password::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Create an invite code. + pub async fn create_invite_code( + &self, + input: crate::com::atproto::server::create_invite_code::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::create_invite_code::Output, + crate::com::atproto::server::create_invite_code::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::create_invite_code::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Create invite codes. + pub async fn create_invite_codes( + &self, + input: crate::com::atproto::server::create_invite_codes::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::create_invite_codes::Output, + crate::com::atproto::server::create_invite_codes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::create_invite_codes::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Create an authentication session. + pub async fn create_session( + &self, + input: crate::com::atproto::server::create_session::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::create_session::Output, + crate::com::atproto::server::create_session::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::create_session::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host. + pub async fn deactivate_account( + &self, + input: crate::com::atproto::server::deactivate_account::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::server::deactivate_account::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::deactivate_account::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth. + pub async fn delete_account( + &self, + input: crate::com::atproto::server::delete_account::Input, + ) -> atrium_xrpc::Result<(), crate::com::atproto::server::delete_account::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::delete_account::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Delete the current session. Requires auth. + pub async fn delete_session( + &self, + ) -> atrium_xrpc::Result<(), crate::com::atproto::server::delete_session::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::delete_session::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Describes the server's account creation requirements and capabilities. Implemented by PDS. + pub async fn describe_server( + &self, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::describe_server::Output, + crate::com::atproto::server::describe_server::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::server::describe_server::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get all invite codes for the current account. Requires auth. + pub async fn get_account_invite_codes( + &self, + params: crate::com::atproto::server::get_account_invite_codes::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::get_account_invite_codes::Output, + crate::com::atproto::server::get_account_invite_codes::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::server::get_account_invite_codes::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a signed token on behalf of the requesting DID for the requested service. + pub async fn get_service_auth( + &self, + params: crate::com::atproto::server::get_service_auth::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::get_service_auth::Output, + crate::com::atproto::server::get_service_auth::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::server::get_service_auth::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get information about the current auth session. Requires auth. + pub async fn get_session( + &self, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::get_session::Output, + crate::com::atproto::server::get_session::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::server::get_session::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///List all App Passwords. + pub async fn list_app_passwords( + &self, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::list_app_passwords::Output, + crate::com::atproto::server::list_app_passwords::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::server::list_app_passwords::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). + pub async fn refresh_session( + &self, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::refresh_session::Output, + crate::com::atproto::server::refresh_session::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::refresh_session::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Initiate a user account deletion via email. + pub async fn request_account_delete( + &self, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::server::request_account_delete::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::request_account_delete::NSID + .into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Request an email with a code to confirm ownership of email. + pub async fn request_email_confirmation( + &self, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::server::request_email_confirmation::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::request_email_confirmation::NSID + .into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Request a token in order to update email. + pub async fn request_email_update( + &self, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::request_email_update::Output, + crate::com::atproto::server::request_email_update::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::request_email_update::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Initiate a user account password reset via email. + pub async fn request_password_reset( + &self, + input: crate::com::atproto::server::request_password_reset::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::server::request_password_reset::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::request_password_reset::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented. + pub async fn reserve_signing_key( + &self, + input: crate::com::atproto::server::reserve_signing_key::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::server::reserve_signing_key::Output, + crate::com::atproto::server::reserve_signing_key::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::reserve_signing_key::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Reset a user account password using a token. + pub async fn reset_password( + &self, + input: crate::com::atproto::server::reset_password::Input, + ) -> atrium_xrpc::Result<(), crate::com::atproto::server::reset_password::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::reset_password::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Revoke an App Password by name. + pub async fn revoke_app_password( + &self, + input: crate::com::atproto::server::revoke_app_password::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::server::revoke_app_password::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::revoke_app_password::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Update an account's email. + pub async fn update_email( + &self, + input: crate::com::atproto::server::update_email::Input, + ) -> atrium_xrpc::Result<(), crate::com::atproto::server::update_email::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::server::update_email::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl com::atproto::sync::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. + pub async fn get_blob( + &self, + params: crate::com::atproto::sync::get_blob::Parameters, + ) -> atrium_xrpc::Result, crate::com::atproto::sync::get_blob::Error> { + let response = self + .xrpc + .send_xrpc::< + _, + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::get_blob::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(bytes) => Ok(bytes), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS. + pub async fn get_blocks( + &self, + params: crate::com::atproto::sync::get_blocks::Parameters, + ) -> atrium_xrpc::Result, crate::com::atproto::sync::get_blocks::Error> { + let response = self + .xrpc + .send_xrpc::< + _, + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::get_blocks::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(bytes) => Ok(bytes), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///DEPRECATED - please use com.atproto.sync.getRepo instead + pub async fn get_checkout( + &self, + params: crate::com::atproto::sync::get_checkout::Parameters, + ) -> atrium_xrpc::Result, crate::com::atproto::sync::get_checkout::Error> { + let response = self + .xrpc + .send_xrpc::< + _, + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::get_checkout::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(bytes) => Ok(bytes), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///DEPRECATED - please use com.atproto.sync.getLatestCommit instead + pub async fn get_head( + &self, + params: crate::com::atproto::sync::get_head::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::sync::get_head::Output, + crate::com::atproto::sync::get_head::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::get_head::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Returns information about a specified upstream host, as consumed by the server. Implemented by relays. + pub async fn get_host_status( + &self, + params: crate::com::atproto::sync::get_host_status::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::sync::get_host_status::Output, + crate::com::atproto::sync::get_host_status::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::get_host_status::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get the current commit CID & revision of the specified repo. Does not require auth. + pub async fn get_latest_commit( + &self, + params: crate::com::atproto::sync::get_latest_commit::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::sync::get_latest_commit::Output, + crate::com::atproto::sync::get_latest_commit::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::get_latest_commit::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth. + pub async fn get_record( + &self, + params: crate::com::atproto::sync::get_record::Parameters, + ) -> atrium_xrpc::Result, crate::com::atproto::sync::get_record::Error> { + let response = self + .xrpc + .send_xrpc::< + _, + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::get_record::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(bytes) => Ok(bytes), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS. + pub async fn get_repo( + &self, + params: crate::com::atproto::sync::get_repo::Parameters, + ) -> atrium_xrpc::Result, crate::com::atproto::sync::get_repo::Error> { + let response = self + .xrpc + .send_xrpc::< + _, + (), + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::get_repo::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(bytes) => Ok(bytes), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay. + pub async fn get_repo_status( + &self, + params: crate::com::atproto::sync::get_repo_status::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::sync::get_repo_status::Output, + crate::com::atproto::sync::get_repo_status::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::get_repo_status::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS. + pub async fn list_blobs( + &self, + params: crate::com::atproto::sync::list_blobs::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::sync::list_blobs::Output, + crate::com::atproto::sync::list_blobs::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::list_blobs::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays. + pub async fn list_hosts( + &self, + params: crate::com::atproto::sync::list_hosts::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::sync::list_hosts::Output, + crate::com::atproto::sync::list_hosts::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::list_hosts::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay. + pub async fn list_repos( + &self, + params: crate::com::atproto::sync::list_repos::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::sync::list_repos::Output, + crate::com::atproto::sync::list_repos::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::list_repos::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Enumerates all the DIDs which have records with the given collection NSID. + pub async fn list_repos_by_collection( + &self, + params: crate::com::atproto::sync::list_repos_by_collection::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::sync::list_repos_by_collection::Output, + crate::com::atproto::sync::list_repos_by_collection::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::sync::list_repos_by_collection::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl + pub async fn notify_of_update( + &self, + input: crate::com::atproto::sync::notify_of_update::Input, + ) -> atrium_xrpc::Result<(), crate::com::atproto::sync::notify_of_update::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::sync::notify_of_update::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth. + pub async fn request_crawl( + &self, + input: crate::com::atproto::sync::request_crawl::Input, + ) -> atrium_xrpc::Result<(), crate::com::atproto::sync::request_crawl::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::sync::request_crawl::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl com::atproto::temp::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Add a handle to the set of reserved handles. + pub async fn add_reserved_handle( + &self, + input: crate::com::atproto::temp::add_reserved_handle::Input, + ) -> atrium_xrpc::Result< + crate::com::atproto::temp::add_reserved_handle::Output, + crate::com::atproto::temp::add_reserved_handle::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::temp::add_reserved_handle::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Check accounts location in signup queue. + pub async fn check_signup_queue( + &self, + ) -> atrium_xrpc::Result< + crate::com::atproto::temp::check_signup_queue::Output, + crate::com::atproto::temp::check_signup_queue::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::temp::check_signup_queue::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date. + pub async fn fetch_labels( + &self, + params: crate::com::atproto::temp::fetch_labels::Parameters, + ) -> atrium_xrpc::Result< + crate::com::atproto::temp::fetch_labels::Output, + crate::com::atproto::temp::fetch_labels::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::com::atproto::temp::fetch_labels::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Request a verification code to be sent to the supplied phone number + pub async fn request_phone_verification( + &self, + input: crate::com::atproto::temp::request_phone_verification::Input, + ) -> atrium_xrpc::Result< + (), + crate::com::atproto::temp::request_phone_verification::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::com::atproto::temp::request_phone_verification::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl tools::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + ozone: tools::ozone::Service::new(std::sync::Arc::clone(&xrpc)), + _phantom: core::marker::PhantomData, + } + } +} +impl tools::ozone::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + communication: tools::ozone::communication::Service::new( + std::sync::Arc::clone(&xrpc), + ), + hosting: tools::ozone::hosting::Service::new(std::sync::Arc::clone(&xrpc)), + moderation: tools::ozone::moderation::Service::new( + std::sync::Arc::clone(&xrpc), + ), + server: tools::ozone::server::Service::new(std::sync::Arc::clone(&xrpc)), + set: tools::ozone::set::Service::new(std::sync::Arc::clone(&xrpc)), + setting: tools::ozone::setting::Service::new(std::sync::Arc::clone(&xrpc)), + signature: tools::ozone::signature::Service::new( + std::sync::Arc::clone(&xrpc), + ), + team: tools::ozone::team::Service::new(std::sync::Arc::clone(&xrpc)), + verification: tools::ozone::verification::Service::new( + std::sync::Arc::clone(&xrpc), + ), + _phantom: core::marker::PhantomData, + } + } +} +impl tools::ozone::communication::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Administrative action to create a new, re-usable communication (email for now) template. + pub async fn create_template( + &self, + input: crate::tools::ozone::communication::create_template::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::communication::create_template::Output, + crate::tools::ozone::communication::create_template::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::communication::create_template::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Delete a communication template. + pub async fn delete_template( + &self, + input: crate::tools::ozone::communication::delete_template::Input, + ) -> atrium_xrpc::Result< + (), + crate::tools::ozone::communication::delete_template::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::communication::delete_template::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get list of all communication templates. + pub async fn list_templates( + &self, + ) -> atrium_xrpc::Result< + crate::tools::ozone::communication::list_templates::Output, + crate::tools::ozone::communication::list_templates::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::communication::list_templates::NSID + .into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only. + pub async fn update_template( + &self, + input: crate::tools::ozone::communication::update_template::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::communication::update_template::Output, + crate::tools::ozone::communication::update_template::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::communication::update_template::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl tools::ozone::hosting::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Get account history, e.g. log of updated email addresses or other identity information. + pub async fn get_account_history( + &self, + params: crate::tools::ozone::hosting::get_account_history::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::hosting::get_account_history::Output, + crate::tools::ozone::hosting::get_account_history::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::hosting::get_account_history::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl tools::ozone::moderation::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Take a moderation action on an actor. + pub async fn emit_event( + &self, + input: crate::tools::ozone::moderation::emit_event::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::emit_event::Output, + crate::tools::ozone::moderation::emit_event::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::moderation::emit_event::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get details about a moderation event. + pub async fn get_event( + &self, + params: crate::tools::ozone::moderation::get_event::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::get_event::Output, + crate::tools::ozone::moderation::get_event::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::get_event::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get details about a record. + pub async fn get_record( + &self, + params: crate::tools::ozone::moderation::get_record::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::get_record::Output, + crate::tools::ozone::moderation::get_record::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::get_record::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get details about some records. + pub async fn get_records( + &self, + params: crate::tools::ozone::moderation::get_records::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::get_records::Output, + crate::tools::ozone::moderation::get_records::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::get_records::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get details about a repository. + pub async fn get_repo( + &self, + params: crate::tools::ozone::moderation::get_repo::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::get_repo::Output, + crate::tools::ozone::moderation::get_repo::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::get_repo::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get reporter stats for a list of users. + pub async fn get_reporter_stats( + &self, + params: crate::tools::ozone::moderation::get_reporter_stats::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::get_reporter_stats::Output, + crate::tools::ozone::moderation::get_reporter_stats::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::get_reporter_stats::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get details about some repositories. + pub async fn get_repos( + &self, + params: crate::tools::ozone::moderation::get_repos::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::get_repos::Output, + crate::tools::ozone::moderation::get_repos::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::get_repos::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get details about subjects. + pub async fn get_subjects( + &self, + params: crate::tools::ozone::moderation::get_subjects::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::get_subjects::Output, + crate::tools::ozone::moderation::get_subjects::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::get_subjects::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///List moderation events related to a subject. + pub async fn query_events( + &self, + params: crate::tools::ozone::moderation::query_events::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::query_events::Output, + crate::tools::ozone::moderation::query_events::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::query_events::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///View moderation statuses of subjects (record or repo). + pub async fn query_statuses( + &self, + params: crate::tools::ozone::moderation::query_statuses::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::query_statuses::Output, + crate::tools::ozone::moderation::query_statuses::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::query_statuses::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Find repositories based on a search term. + pub async fn search_repos( + &self, + params: crate::tools::ozone::moderation::search_repos::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::moderation::search_repos::Output, + crate::tools::ozone::moderation::search_repos::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::moderation::search_repos::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl tools::ozone::server::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Get details about ozone's server configuration. + pub async fn get_config( + &self, + ) -> atrium_xrpc::Result< + crate::tools::ozone::server::get_config::Output, + crate::tools::ozone::server::get_config::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::server::get_config::NSID.into(), + parameters: None, + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl tools::ozone::set::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Add values to a specific set. Attempting to add values to a set that does not exist will result in an error. + pub async fn add_values( + &self, + input: crate::tools::ozone::set::add_values::Input, + ) -> atrium_xrpc::Result<(), crate::tools::ozone::set::add_values::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::set::add_values::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Delete an entire set. Attempting to delete a set that does not exist will result in an error. + pub async fn delete_set( + &self, + input: crate::tools::ozone::set::delete_set::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::set::delete_set::Output, + crate::tools::ozone::set::delete_set::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::set::delete_set::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error + pub async fn delete_values( + &self, + input: crate::tools::ozone::set::delete_values::Input, + ) -> atrium_xrpc::Result<(), crate::tools::ozone::set::delete_values::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::set::delete_values::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get a specific set and its values + pub async fn get_values( + &self, + params: crate::tools::ozone::set::get_values::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::set::get_values::Output, + crate::tools::ozone::set::get_values::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::set::get_values::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Query available sets + pub async fn query_sets( + &self, + params: crate::tools::ozone::set::query_sets::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::set::query_sets::Output, + crate::tools::ozone::set::query_sets::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::set::query_sets::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Create or update set metadata + pub async fn upsert_set( + &self, + input: crate::tools::ozone::set::upsert_set::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::set::upsert_set::Output, + crate::tools::ozone::set::upsert_set::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::set::upsert_set::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl tools::ozone::setting::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///List settings with optional filtering + pub async fn list_options( + &self, + params: crate::tools::ozone::setting::list_options::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::setting::list_options::Output, + crate::tools::ozone::setting::list_options::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::setting::list_options::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Delete settings by key + pub async fn remove_options( + &self, + input: crate::tools::ozone::setting::remove_options::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::setting::remove_options::Output, + crate::tools::ozone::setting::remove_options::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::setting::remove_options::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Create or update setting option + pub async fn upsert_option( + &self, + input: crate::tools::ozone::setting::upsert_option::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::setting::upsert_option::Output, + crate::tools::ozone::setting::upsert_option::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::setting::upsert_option::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl tools::ozone::signature::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Find all correlated threat signatures between 2 or more accounts. + pub async fn find_correlation( + &self, + params: crate::tools::ozone::signature::find_correlation::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::signature::find_correlation::Output, + crate::tools::ozone::signature::find_correlation::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::signature::find_correlation::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Get accounts that share some matching threat signatures with the root account. + pub async fn find_related_accounts( + &self, + params: crate::tools::ozone::signature::find_related_accounts::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::signature::find_related_accounts::Output, + crate::tools::ozone::signature::find_related_accounts::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::signature::find_related_accounts::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Search for accounts that match one or more threat signature values. + pub async fn search_accounts( + &self, + params: crate::tools::ozone::signature::search_accounts::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::signature::search_accounts::Output, + crate::tools::ozone::signature::search_accounts::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::signature::search_accounts::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl tools::ozone::team::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Add a member to the ozone team. Requires admin role. + pub async fn add_member( + &self, + input: crate::tools::ozone::team::add_member::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::team::add_member::Output, + crate::tools::ozone::team::add_member::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::team::add_member::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Delete a member from ozone team. Requires admin role. + pub async fn delete_member( + &self, + input: crate::tools::ozone::team::delete_member::Input, + ) -> atrium_xrpc::Result<(), crate::tools::ozone::team::delete_member::Error> { + let response = self + .xrpc + .send_xrpc::< + (), + _, + (), + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::team::delete_member::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Bytes(_) => Ok(()), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///List all members with access to the ozone service. + pub async fn list_members( + &self, + params: crate::tools::ozone::team::list_members::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::team::list_members::Output, + crate::tools::ozone::team::list_members::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::team::list_members::NSID.into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Update a member in the ozone service. Requires admin role. + pub async fn update_member( + &self, + input: crate::tools::ozone::team::update_member::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::team::update_member::Output, + crate::tools::ozone::team::update_member::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::team::update_member::NSID.into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} +impl tools::ozone::verification::Service +where + T: atrium_xrpc::XrpcClient + Send + Sync, +{ + #[allow(unused_variables)] + pub(crate) fn new(xrpc: std::sync::Arc) -> Self { + Self { + xrpc, + _phantom: core::marker::PhantomData, + } + } + ///Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once. + pub async fn grant_verifications( + &self, + input: crate::tools::ozone::verification::grant_verifications::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::verification::grant_verifications::Output, + crate::tools::ozone::verification::grant_verifications::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::verification::grant_verifications::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///List verifications + pub async fn list_verifications( + &self, + params: crate::tools::ozone::verification::list_verifications::Parameters, + ) -> atrium_xrpc::Result< + crate::tools::ozone::verification::list_verifications::Output, + crate::tools::ozone::verification::list_verifications::Error, + > { + let response = self + .xrpc + .send_xrpc::< + _, + (), + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::GET, + nsid: crate::tools::ozone::verification::list_verifications::NSID + .into(), + parameters: Some(params), + input: None, + encoding: None, + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } + ///Revoke previously granted verifications in batches of up to 100. + pub async fn revoke_verifications( + &self, + input: crate::tools::ozone::verification::revoke_verifications::Input, + ) -> atrium_xrpc::Result< + crate::tools::ozone::verification::revoke_verifications::Output, + crate::tools::ozone::verification::revoke_verifications::Error, + > { + let response = self + .xrpc + .send_xrpc::< + (), + _, + _, + _, + >( + &atrium_xrpc::XrpcRequest { + method: http::Method::POST, + nsid: crate::tools::ozone::verification::revoke_verifications::NSID + .into(), + parameters: None, + input: Some(atrium_xrpc::InputDataOrBytes::Data(input)), + encoding: Some(String::from("application/json")), + }, + ) + .await?; + match response { + atrium_xrpc::OutputDataOrBytes::Data(data) => Ok(data), + _ => Err(atrium_xrpc::Error::UnexpectedResponseType), + } + } +} diff --git a/crates/weaver-common/src/lexicons/com.rs b/crates/weaver-common/src/lexicons/com.rs new file mode 100644 index 0000000..ff8b139 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com` namespace. +pub mod atproto; diff --git a/crates/weaver-common/src/lexicons/com/atproto.rs b/crates/weaver-common/src/lexicons/com/atproto.rs new file mode 100644 index 0000000..b52b599 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto` namespace. +pub mod admin; +pub mod identity; +pub mod label; +pub mod lexicon; +pub mod moderation; +pub mod repo; +pub mod server; +pub mod sync; +pub mod temp; diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin.rs b/crates/weaver-common/src/lexicons/com/atproto/admin.rs new file mode 100644 index 0000000..b269a9c --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin` namespace. +pub mod defs; +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; diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/defs.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/defs.rs new file mode 100644 index 0000000..ddc3007 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/defs.rs @@ -0,0 +1,60 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AccountViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated_at: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email_confirmed_at: core::option::Option, + pub handle: atrium_api::types::string::Handle, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invite_note: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invited_by: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invites: core::option::Option< + Vec, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invites_disabled: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub related_records: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub threat_signatures: core::option::Option>, +} +pub type AccountView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RepoBlobRefData { + pub cid: atrium_api::types::string::Cid, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub record_uri: core::option::Option, +} +pub type RepoBlobRef = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RepoRefData { + pub did: atrium_api::types::string::Did, +} +pub type RepoRef = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct StatusAttrData { + pub applied: bool, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub r#ref: core::option::Option, +} +pub type StatusAttr = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ThreatSignatureData { + pub property: String, + pub value: String, +} +pub type ThreatSignature = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/delete_account.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/delete_account.rs new file mode 100644 index 0000000..471a91b --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/delete_account.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.deleteAccount` namespace. +pub const NSID: &str = "com.atproto.admin.deleteAccount"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub did: atrium_api::types::string::Did, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/disable_account_invites.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/disable_account_invites.rs new file mode 100644 index 0000000..4f6d878 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/disable_account_invites.rs @@ -0,0 +1,20 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.disableAccountInvites` namespace. +pub const NSID: &str = "com.atproto.admin.disableAccountInvites"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub account: atrium_api::types::string::Did, + ///Optional reason for disabled invites. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub note: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/disable_invite_codes.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/disable_invite_codes.rs new file mode 100644 index 0000000..365ce3c --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/disable_invite_codes.rs @@ -0,0 +1,20 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.disableInviteCodes` namespace. +pub const NSID: &str = "com.atproto.admin.disableInviteCodes"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub accounts: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub codes: core::option::Option>, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/enable_account_invites.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/enable_account_invites.rs new file mode 100644 index 0000000..13e9966 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/enable_account_invites.rs @@ -0,0 +1,20 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.enableAccountInvites` namespace. +pub const NSID: &str = "com.atproto.admin.enableAccountInvites"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub account: atrium_api::types::string::Did, + ///Optional reason for enabled invites. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub note: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/get_account_info.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/get_account_info.rs new file mode 100644 index 0000000..6746521 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/get_account_info.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.getAccountInfo` namespace. +pub const NSID: &str = "com.atproto.admin.getAccountInfo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub did: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +pub type Output = crate::com::atproto::admin::defs::AccountView; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/get_account_infos.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/get_account_infos.rs new file mode 100644 index 0000000..bfb36a4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/get_account_infos.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.getAccountInfos` namespace. +pub const NSID: &str = "com.atproto.admin.getAccountInfos"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub dids: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub infos: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/get_invite_codes.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/get_invite_codes.rs new file mode 100644 index 0000000..3f23c90 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/get_invite_codes.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.getInviteCodes` namespace. +pub const NSID: &str = "com.atproto.admin.getInviteCodes"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub codes: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/get_subject_status.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/get_subject_status.rs new file mode 100644 index 0000000..3598186 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/get_subject_status.rs @@ -0,0 +1,42 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.getSubjectStatus` namespace. +pub const NSID: &str = "com.atproto.admin.getSubjectStatus"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub blob: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub uri: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated: core::option::Option, + pub subject: atrium_api::types::Union, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takedown: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputSubjectRefs { + #[serde(rename = "com.atproto.admin.defs#repoRef")] + ComAtprotoAdminDefsRepoRef(Box), + #[serde(rename = "com.atproto.repo.strongRef")] + ComAtprotoRepoStrongRefMain(Box), + #[serde(rename = "com.atproto.admin.defs#repoBlobRef")] + ComAtprotoAdminDefsRepoBlobRef(Box), +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/search_accounts.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/search_accounts.rs new file mode 100644 index 0000000..9e4eb40 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/search_accounts.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.searchAccounts` namespace. +pub const NSID: &str = "com.atproto.admin.searchAccounts"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub accounts: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/send_email.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/send_email.rs new file mode 100644 index 0000000..1599aa1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/send_email.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.sendEmail` namespace. +pub const NSID: &str = "com.atproto.admin.sendEmail"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///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 = "core::option::Option::is_none")] + pub comment: core::option::Option, + pub content: String, + pub recipient_did: atrium_api::types::string::Did, + pub sender_did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub sent: bool, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_email.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_email.rs new file mode 100644 index 0000000..72e8968 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_email.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.updateAccountEmail` namespace. +pub const NSID: &str = "com.atproto.admin.updateAccountEmail"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///The handle or DID of the repo. + pub account: atrium_api::types::string::AtIdentifier, + pub email: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_handle.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_handle.rs new file mode 100644 index 0000000..84de37e --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_handle.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.updateAccountHandle` namespace. +pub const NSID: &str = "com.atproto.admin.updateAccountHandle"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub did: atrium_api::types::string::Did, + pub handle: atrium_api::types::string::Handle, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_password.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_password.rs new file mode 100644 index 0000000..6bdbd44 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_password.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.updateAccountPassword` namespace. +pub const NSID: &str = "com.atproto.admin.updateAccountPassword"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub did: atrium_api::types::string::Did, + pub password: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_signing_key.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_signing_key.rs new file mode 100644 index 0000000..786bc28 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/update_account_signing_key.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.updateAccountSigningKey` namespace. +pub const NSID: &str = "com.atproto.admin.updateAccountSigningKey"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub did: atrium_api::types::string::Did, + ///Did-key formatted public key + pub signing_key: atrium_api::types::string::Did, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/admin/update_subject_status.rs b/crates/weaver-common/src/lexicons/com/atproto/admin/update_subject_status.rs new file mode 100644 index 0000000..cc325ea --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/admin/update_subject_status.rs @@ -0,0 +1,49 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.admin.updateSubjectStatus` namespace. +pub const NSID: &str = "com.atproto.admin.updateSubjectStatus"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated: core::option::Option, + pub subject: atrium_api::types::Union, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takedown: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub subject: atrium_api::types::Union, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takedown: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum InputSubjectRefs { + #[serde(rename = "com.atproto.admin.defs#repoRef")] + ComAtprotoAdminDefsRepoRef(Box), + #[serde(rename = "com.atproto.repo.strongRef")] + ComAtprotoRepoStrongRefMain(Box), + #[serde(rename = "com.atproto.admin.defs#repoBlobRef")] + ComAtprotoAdminDefsRepoBlobRef(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputSubjectRefs { + #[serde(rename = "com.atproto.admin.defs#repoRef")] + ComAtprotoAdminDefsRepoRef(Box), + #[serde(rename = "com.atproto.repo.strongRef")] + ComAtprotoRepoStrongRefMain(Box), + #[serde(rename = "com.atproto.admin.defs#repoBlobRef")] + ComAtprotoAdminDefsRepoBlobRef(Box), +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity.rs b/crates/weaver-common/src/lexicons/com/atproto/identity.rs new file mode 100644 index 0000000..d6a4964 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity.rs @@ -0,0 +1,12 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity` namespace. +pub mod defs; +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; diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/defs.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/defs.rs new file mode 100644 index 0000000..764c89c --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/defs.rs @@ -0,0 +1,12 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct IdentityInfoData { + pub did: atrium_api::types::string::Did, + ///The complete DID document for the identity. + pub did_doc: atrium_api::types::Unknown, + ///The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. + pub handle: atrium_api::types::string::Handle, +} +pub type IdentityInfo = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/get_recommended_did_credentials.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/get_recommended_did_credentials.rs new file mode 100644 index 0000000..cd613a1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/get_recommended_did_credentials.rs @@ -0,0 +1,25 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.getRecommendedDidCredentials` namespace. +pub const NSID: &str = "com.atproto.identity.getRecommendedDidCredentials"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub also_known_as: core::option::Option>, + ///Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rotation_keys: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub services: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verification_methods: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/refresh_identity.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/refresh_identity.rs new file mode 100644 index 0000000..767e823 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/refresh_identity.rs @@ -0,0 +1,45 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.refreshIdentity` namespace. +pub const NSID: &str = "com.atproto.identity.refreshIdentity"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub identifier: atrium_api::types::string::AtIdentifier, +} +pub type Input = atrium_api::types::Object; +pub type Output = crate::com::atproto::identity::defs::IdentityInfo; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///The resolution process confirmed that the handle does not resolve to any DID. + HandleNotFound(Option), + ///The DID resolution process confirmed that there is no current DID. + DidNotFound(Option), + ///The DID previously existed, but has been deactivated. + DidDeactivated(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::HandleNotFound(msg) => { + write!(_f, "HandleNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::DidNotFound(msg) => { + write!(_f, "DidNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::DidDeactivated(msg) => { + write!(_f, "DidDeactivated")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/request_plc_operation_signature.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/request_plc_operation_signature.rs new file mode 100644 index 0000000..8a8fe72 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/request_plc_operation_signature.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.requestPlcOperationSignature` namespace. +pub const NSID: &str = "com.atproto.identity.requestPlcOperationSignature"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/resolve_did.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/resolve_did.rs new file mode 100644 index 0000000..65df2d5 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/resolve_did.rs @@ -0,0 +1,44 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.resolveDid` namespace. +pub const NSID: &str = "com.atproto.identity.resolveDid"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///DID to resolve. + pub did: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///The complete DID document for the identity. + pub did_doc: atrium_api::types::Unknown, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///The DID resolution process confirmed that there is no current DID. + DidNotFound(Option), + ///The DID previously existed, but has been deactivated. + DidDeactivated(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::DidNotFound(msg) => { + write!(_f, "DidNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::DidDeactivated(msg) => { + write!(_f, "DidDeactivated")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/resolve_handle.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/resolve_handle.rs new file mode 100644 index 0000000..a13c73d --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/resolve_handle.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.resolveHandle` namespace. +pub const NSID: &str = "com.atproto.identity.resolveHandle"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The handle to resolve. + pub handle: atrium_api::types::string::Handle, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub did: atrium_api::types::string::Did, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///The resolution process confirmed that the handle does not resolve to any DID. + HandleNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::HandleNotFound(msg) => { + write!(_f, "HandleNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/resolve_identity.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/resolve_identity.rs new file mode 100644 index 0000000..0a3c4b1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/resolve_identity.rs @@ -0,0 +1,46 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.resolveIdentity` namespace. +pub const NSID: &str = "com.atproto.identity.resolveIdentity"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Handle or DID to resolve. + pub identifier: atrium_api::types::string::AtIdentifier, +} +pub type Parameters = atrium_api::types::Object; +pub type Output = crate::com::atproto::identity::defs::IdentityInfo; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///The resolution process confirmed that the handle does not resolve to any DID. + HandleNotFound(Option), + ///The DID resolution process confirmed that there is no current DID. + DidNotFound(Option), + ///The DID previously existed, but has been deactivated. + DidDeactivated(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::HandleNotFound(msg) => { + write!(_f, "HandleNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::DidNotFound(msg) => { + write!(_f, "DidNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::DidDeactivated(msg) => { + write!(_f, "DidDeactivated")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/sign_plc_operation.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/sign_plc_operation.rs new file mode 100644 index 0000000..b12333e --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/sign_plc_operation.rs @@ -0,0 +1,34 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.signPlcOperation` namespace. +pub const NSID: &str = "com.atproto.identity.signPlcOperation"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub also_known_as: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rotation_keys: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub services: core::option::Option, + ///A token received through com.atproto.identity.requestPlcOperationSignature + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub token: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verification_methods: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///A signed DID PLC operation. + pub operation: atrium_api::types::Unknown, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/submit_plc_operation.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/submit_plc_operation.rs new file mode 100644 index 0000000..ecf8fa6 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/submit_plc_operation.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.submitPlcOperation` namespace. +pub const NSID: &str = "com.atproto.identity.submitPlcOperation"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub operation: atrium_api::types::Unknown, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/identity/update_handle.rs b/crates/weaver-common/src/lexicons/com/atproto/identity/update_handle.rs new file mode 100644 index 0000000..0daf75a --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/identity/update_handle.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.identity.updateHandle` namespace. +pub const NSID: &str = "com.atproto.identity.updateHandle"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///The new handle. + pub handle: atrium_api::types::string::Handle, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/label.rs b/crates/weaver-common/src/lexicons/com/atproto/label.rs new file mode 100644 index 0000000..af7c0b0 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/label.rs @@ -0,0 +1,5 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.label` namespace. +pub mod defs; +pub mod query_labels; +pub mod subscribe_labels; diff --git a/crates/weaver-common/src/lexicons/com/atproto/label/defs.rs b/crates/weaver-common/src/lexicons/com/atproto/label/defs.rs new file mode 100644 index 0000000..6980b10 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/label/defs.rs @@ -0,0 +1,82 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.label.defs` namespace. +///Metadata tag on an atproto resource (eg, repo or record). +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelData { + ///Optionally, CID specifying the specific version of 'uri' resource this label applies to. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + ///Timestamp when this label was created. + pub cts: atrium_api::types::string::Datetime, + ///Timestamp at which this label expires (no longer applies). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub exp: core::option::Option, + ///If true, this is a negation label, overwriting a previous label. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub neg: core::option::Option, + ///Signature of dag-cbor encoded label. + #[serde(default)] + #[serde(with = "serde_bytes")] + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sig: core::option::Option>, + ///DID of the actor who created this label. + pub src: atrium_api::types::string::Did, + ///AT URI of the record, repository (account), or other resource that this label applies to. + pub uri: String, + ///The short string name of the value or type of this label. + pub val: String, + ///The AT Protocol version of the label object. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub ver: core::option::Option, +} +pub type Label = atrium_api::types::Object; +pub type LabelValue = String; +///Declares a label value and its expected interpretations and behaviors. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelValueDefinitionData { + ///Does the user need to have adult content enabled in order to configure this label? + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub adult_only: core::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. + pub blurs: String, + ///The default setting for this label. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub default_setting: core::option::Option, + ///The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). + pub identifier: String, + 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. + pub severity: String, +} +pub type LabelValueDefinition = atrium_api::types::Object; +///Strings which describe the label in the UI, localized into a specific language. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelValueDefinitionStringsData { + ///A longer description of what the label means and why it might be applied. + pub description: String, + ///The code of the language these strings are written in. + pub lang: atrium_api::types::string::Language, + ///A short human-readable name for the label. + pub name: String, +} +pub type LabelValueDefinitionStrings = atrium_api::types::Object< + LabelValueDefinitionStringsData, +>; +///Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SelfLabelData { + ///The short string name of the value or type of this label. + pub val: String, +} +pub type SelfLabel = atrium_api::types::Object; +///Metadata tags on an atproto record, published by the author within the record. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SelfLabelsData { + pub values: Vec, +} +pub type SelfLabels = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/label/query_labels.rs b/crates/weaver-common/src/lexicons/com/atproto/label/query_labels.rs new file mode 100644 index 0000000..6a3aa49 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/label/query_labels.rs @@ -0,0 +1,33 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.label.queryLabels` namespace. +pub const NSID: &str = "com.atproto.label.queryLabels"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Optional list of label sources (DIDs) to filter on. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sources: core::option::Option>, + ///List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI. + pub uri_patterns: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub labels: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/label/subscribe_labels.rs b/crates/weaver-common/src/lexicons/com/atproto/label/subscribe_labels.rs new file mode 100644 index 0000000..72e0980 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/label/subscribe_labels.rs @@ -0,0 +1,52 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.label.subscribeLabels` namespace. +pub const NSID: &str = "com.atproto.label.subscribeLabels"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The last known event seq number to backfill from. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + FutureCursor(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::FutureCursor(msg) => { + write!(_f, "FutureCursor")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InfoData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub message: core::option::Option, + pub name: String, +} +pub type Info = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LabelsData { + pub labels: Vec, + pub seq: i64, +} +pub type Labels = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum Message { + #[serde(rename = "com.atproto.label.subscribeLabels#labels")] + Labels(Box), + #[serde(rename = "com.atproto.label.subscribeLabels#info")] + Info(Box), +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/lexicon.rs b/crates/weaver-common/src/lexicons/com/atproto/lexicon.rs new file mode 100644 index 0000000..f00b959 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/lexicon.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.lexicon` namespace. +pub mod schema; diff --git a/crates/weaver-common/src/lexicons/com/atproto/lexicon/schema.rs b/crates/weaver-common/src/lexicons/com/atproto/lexicon/schema.rs new file mode 100644 index 0000000..8ee5aad --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/lexicon/schema.rs @@ -0,0 +1,15 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.lexicon.schema` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + ///Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system. + pub lexicon: i64, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/moderation.rs b/crates/weaver-common/src/lexicons/com/atproto/moderation.rs new file mode 100644 index 0000000..e8be7ac --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/moderation.rs @@ -0,0 +1,4 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.moderation` namespace. +pub mod create_report; +pub mod defs; diff --git a/crates/weaver-common/src/lexicons/com/atproto/moderation/create_report.rs b/crates/weaver-common/src/lexicons/com/atproto/moderation/create_report.rs new file mode 100644 index 0000000..4a81000 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/moderation/create_report.rs @@ -0,0 +1,50 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.moderation.createReport` namespace. +pub const NSID: &str = "com.atproto.moderation.createReport"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Additional context about the content and violation. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reason: core::option::Option, + ///Indicates the broad category of violation the report is for. + pub reason_type: crate::com::atproto::moderation::defs::ReasonType, + pub subject: atrium_api::types::Union, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub created_at: atrium_api::types::string::Datetime, + pub id: i64, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reason: core::option::Option, + pub reason_type: crate::com::atproto::moderation::defs::ReasonType, + pub reported_by: atrium_api::types::string::Did, + pub subject: atrium_api::types::Union, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum InputSubjectRefs { + #[serde(rename = "com.atproto.admin.defs#repoRef")] + ComAtprotoAdminDefsRepoRef(Box), + #[serde(rename = "com.atproto.repo.strongRef")] + ComAtprotoRepoStrongRefMain(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputSubjectRefs { + #[serde(rename = "com.atproto.admin.defs#repoRef")] + ComAtprotoAdminDefsRepoRef(Box), + #[serde(rename = "com.atproto.repo.strongRef")] + ComAtprotoRepoStrongRefMain(Box), +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/moderation/defs.rs b/crates/weaver-common/src/lexicons/com/atproto/moderation/defs.rs new file mode 100644 index 0000000..48b07b4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/moderation/defs.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.moderation.defs` namespace. +///Appeal: appeal a previously taken moderation action +pub const REASON_APPEAL: &str = "com.atproto.moderation.defs#reasonAppeal"; +///Misleading identity, affiliation, or content +pub const REASON_MISLEADING: &str = "com.atproto.moderation.defs#reasonMisleading"; +///Other: reports not falling under another report category +pub const REASON_OTHER: &str = "com.atproto.moderation.defs#reasonOther"; +///Rude, harassing, explicit, or otherwise unwelcoming behavior +pub const REASON_RUDE: &str = "com.atproto.moderation.defs#reasonRude"; +///Unwanted or mislabeled sexual content +pub const REASON_SEXUAL: &str = "com.atproto.moderation.defs#reasonSexual"; +///Spam: frequent unwanted promotion, replies, mentions +pub const REASON_SPAM: &str = "com.atproto.moderation.defs#reasonSpam"; +pub type ReasonType = String; +///Direct violation of server rules, laws, terms of service +pub const REASON_VIOLATION: &str = "com.atproto.moderation.defs#reasonViolation"; +///Tag describing a type of subject that might be reported. +pub type SubjectType = String; diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo.rs b/crates/weaver-common/src/lexicons/com/atproto/repo.rs new file mode 100644 index 0000000..5443544 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo.rs @@ -0,0 +1,14 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo` namespace. +pub mod apply_writes; +pub mod create_record; +pub mod defs; +pub mod delete_record; +pub mod describe_repo; +pub mod get_record; +pub mod import_repo; +pub mod list_missing_blobs; +pub mod list_records; +pub mod put_record; +pub mod strong_ref; +pub mod upload_blob; diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/apply_writes.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/apply_writes.rs new file mode 100644 index 0000000..daa418e --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/apply_writes.rs @@ -0,0 +1,115 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.applyWrites` namespace. +pub const NSID: &str = "com.atproto.repo.applyWrites"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///The handle or DID of the repo (aka, current account). + pub repo: atrium_api::types::string::AtIdentifier, + ///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 = "core::option::Option::is_none")] + pub swap_commit: core::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 = "core::option::Option::is_none")] + pub validate: core::option::Option, + pub writes: Vec, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub commit: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub results: core::option::Option>, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///Indicates that the 'swapCommit' parameter did not match current commit. + InvalidSwap(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::InvalidSwap(msg) => { + write!(_f, "InvalidSwap")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} +///Operation which creates a new record. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct CreateData { + pub collection: atrium_api::types::string::Nsid, + ///NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rkey: core::option::Option, + pub value: atrium_api::types::Unknown, +} +pub type Create = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct CreateResultData { + pub cid: atrium_api::types::string::Cid, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validation_status: core::option::Option, +} +pub type CreateResult = atrium_api::types::Object; +///Operation which deletes an existing record. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct DeleteData { + pub collection: atrium_api::types::string::Nsid, + pub rkey: atrium_api::types::string::RecordKey, +} +pub type Delete = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct DeleteResultData {} +pub type DeleteResult = atrium_api::types::Object; +///Operation which updates an existing record. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct UpdateData { + pub collection: atrium_api::types::string::Nsid, + pub rkey: atrium_api::types::string::RecordKey, + pub value: atrium_api::types::Unknown, +} +pub type Update = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct UpdateResultData { + pub cid: atrium_api::types::string::Cid, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validation_status: core::option::Option, +} +pub type UpdateResult = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum InputWritesItem { + #[serde(rename = "com.atproto.repo.applyWrites#create")] + Create(Box), + #[serde(rename = "com.atproto.repo.applyWrites#update")] + Update(Box), + #[serde(rename = "com.atproto.repo.applyWrites#delete")] + Delete(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputResultsItem { + #[serde(rename = "com.atproto.repo.applyWrites#createResult")] + CreateResult(Box), + #[serde(rename = "com.atproto.repo.applyWrites#updateResult")] + UpdateResult(Box), + #[serde(rename = "com.atproto.repo.applyWrites#deleteResult")] + DeleteResult(Box), +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/create_record.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/create_record.rs new file mode 100644 index 0000000..5c67c31 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/create_record.rs @@ -0,0 +1,53 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.createRecord` namespace. +pub const NSID: &str = "com.atproto.repo.createRecord"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///The NSID of the record collection. + pub collection: atrium_api::types::string::Nsid, + ///The record itself. Must contain a $type field. + pub record: atrium_api::types::Unknown, + ///The handle or DID of the repo (aka, current account). + pub repo: atrium_api::types::string::AtIdentifier, + ///The Record Key. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rkey: core::option::Option, + ///Compare and swap with the previous commit by CID. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub swap_commit: core::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 = "core::option::Option::is_none")] + pub validate: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub cid: atrium_api::types::string::Cid, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub commit: core::option::Option, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validation_status: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///Indicates that 'swapCommit' didn't match current repo commit. + InvalidSwap(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::InvalidSwap(msg) => { + write!(_f, "InvalidSwap")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/defs.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/defs.rs new file mode 100644 index 0000000..6f9c9f5 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/defs.rs @@ -0,0 +1,9 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct CommitMetaData { + pub cid: atrium_api::types::string::Cid, + pub rev: atrium_api::types::string::Tid, +} +pub type CommitMeta = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/delete_record.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/delete_record.rs new file mode 100644 index 0000000..7f89589 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/delete_record.rs @@ -0,0 +1,45 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.deleteRecord` namespace. +pub const NSID: &str = "com.atproto.repo.deleteRecord"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///The NSID of the record collection. + pub collection: atrium_api::types::string::Nsid, + ///The handle or DID of the repo (aka, current account). + pub repo: atrium_api::types::string::AtIdentifier, + ///The Record Key. + pub rkey: atrium_api::types::string::RecordKey, + ///Compare and swap with the previous commit by CID. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub swap_commit: core::option::Option, + ///Compare and swap with the previous record by CID. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub swap_record: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub commit: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + InvalidSwap(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::InvalidSwap(msg) => { + write!(_f, "InvalidSwap")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/describe_repo.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/describe_repo.rs new file mode 100644 index 0000000..e4b189a --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/describe_repo.rs @@ -0,0 +1,31 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.describeRepo` namespace. +pub const NSID: &str = "com.atproto.repo.describeRepo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The handle or DID of the repo. + pub repo: atrium_api::types::string::AtIdentifier, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///List of all the collections (NSIDs) for which this repo contains at least one record. + pub collections: Vec, + pub did: atrium_api::types::string::Did, + ///The complete DID document for this account. + pub did_doc: atrium_api::types::Unknown, + pub handle: atrium_api::types::string::Handle, + ///Indicates if handle is currently valid (resolves bi-directionally) + pub handle_is_correct: bool, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/get_record.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/get_record.rs new file mode 100644 index 0000000..f6b6f39 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/get_record.rs @@ -0,0 +1,44 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.getRecord` namespace. +pub const NSID: &str = "com.atproto.repo.getRecord"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The CID of the version of the record. If not specified, then return the most recent version. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + ///The NSID of the record collection. + pub collection: atrium_api::types::string::Nsid, + ///The handle or DID of the repo. + pub repo: atrium_api::types::string::AtIdentifier, + ///The Record Key. + pub rkey: atrium_api::types::string::RecordKey, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + pub uri: String, + pub value: atrium_api::types::Unknown, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + RecordNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::RecordNotFound(msg) => { + write!(_f, "RecordNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/import_repo.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/import_repo.rs new file mode 100644 index 0000000..587887e --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/import_repo.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.importRepo` namespace. +pub const NSID: &str = "com.atproto.repo.importRepo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/list_missing_blobs.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/list_missing_blobs.rs new file mode 100644 index 0000000..13c8bce --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/list_missing_blobs.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.listMissingBlobs` namespace. +pub const NSID: &str = "com.atproto.repo.listMissingBlobs"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub blobs: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordBlobData { + pub cid: atrium_api::types::string::Cid, + pub record_uri: String, +} +pub type RecordBlob = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/list_records.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/list_records.rs new file mode 100644 index 0000000..cec1467 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/list_records.rs @@ -0,0 +1,44 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.listRecords` namespace. +pub const NSID: &str = "com.atproto.repo.listRecords"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The NSID of the record type. + pub collection: atrium_api::types::string::Nsid, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///The number of records to return. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///The handle or DID of the repo. + pub repo: atrium_api::types::string::AtIdentifier, + ///Flag to reverse the order of the returned records. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reverse: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub records: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub cid: atrium_api::types::string::Cid, + pub uri: String, + pub value: atrium_api::types::Unknown, +} +pub type Record = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/put_record.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/put_record.rs new file mode 100644 index 0000000..25099e0 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/put_record.rs @@ -0,0 +1,54 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.putRecord` namespace. +pub const NSID: &str = "com.atproto.repo.putRecord"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///The NSID of the record collection. + pub collection: atrium_api::types::string::Nsid, + ///The record to write. + pub record: atrium_api::types::Unknown, + ///The handle or DID of the repo (aka, current account). + pub repo: atrium_api::types::string::AtIdentifier, + ///The Record Key. + pub rkey: atrium_api::types::string::RecordKey, + ///Compare and swap with the previous commit by CID. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub swap_commit: core::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 = "core::option::Option::is_none")] + pub swap_record: core::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 = "core::option::Option::is_none")] + pub validate: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub cid: atrium_api::types::string::Cid, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub commit: core::option::Option, + pub uri: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validation_status: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + InvalidSwap(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::InvalidSwap(msg) => { + write!(_f, "InvalidSwap")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/strong_ref.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/strong_ref.rs new file mode 100644 index 0000000..8eef6d6 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/strong_ref.rs @@ -0,0 +1,10 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.strongRef` namespace. +//!A URI with a content-hash fingerprint. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + pub cid: atrium_api::types::string::Cid, + pub uri: String, +} +pub type Main = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/repo/upload_blob.rs b/crates/weaver-common/src/lexicons/com/atproto/repo/upload_blob.rs new file mode 100644 index 0000000..641861d --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/repo/upload_blob.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.repo.uploadBlob` namespace. +pub const NSID: &str = "com.atproto.repo.uploadBlob"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub blob: atrium_api::types::BlobRef, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server.rs b/crates/weaver-common/src/lexicons/com/atproto/server.rs new file mode 100644 index 0000000..d9dac6e --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server` namespace. +pub mod activate_account; +pub mod check_account_status; +pub mod confirm_email; +pub mod create_account; +pub mod create_app_password; +pub mod create_invite_code; +pub mod create_invite_codes; +pub mod create_session; +pub mod deactivate_account; +pub mod defs; +pub mod delete_account; +pub mod delete_session; +pub mod describe_server; +pub mod get_account_invite_codes; +pub mod get_service_auth; +pub mod get_session; +pub mod list_app_passwords; +pub mod refresh_session; +pub mod request_account_delete; +pub mod request_email_confirmation; +pub mod request_email_update; +pub mod request_password_reset; +pub mod reserve_signing_key; +pub mod reset_password; +pub mod revoke_app_password; +pub mod update_email; diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/activate_account.rs b/crates/weaver-common/src/lexicons/com/atproto/server/activate_account.rs new file mode 100644 index 0000000..2d367da --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/activate_account.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.activateAccount` namespace. +pub const NSID: &str = "com.atproto.server.activateAccount"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/check_account_status.rs b/crates/weaver-common/src/lexicons/com/atproto/server/check_account_status.rs new file mode 100644 index 0000000..d95b8a8 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/check_account_status.rs @@ -0,0 +1,25 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.checkAccountStatus` namespace. +pub const NSID: &str = "com.atproto.server.checkAccountStatus"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub activated: bool, + pub expected_blobs: i64, + pub imported_blobs: i64, + pub indexed_records: i64, + pub private_state_values: i64, + pub repo_blocks: i64, + pub repo_commit: atrium_api::types::string::Cid, + pub repo_rev: String, + pub valid_did: bool, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/confirm_email.rs b/crates/weaver-common/src/lexicons/com/atproto/server/confirm_email.rs new file mode 100644 index 0000000..16b22e7 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/confirm_email.rs @@ -0,0 +1,49 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.confirmEmail` namespace. +pub const NSID: &str = "com.atproto.server.confirmEmail"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub email: String, + pub token: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + AccountNotFound(Option), + ExpiredToken(Option), + InvalidToken(Option), + InvalidEmail(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::AccountNotFound(msg) => { + write!(_f, "AccountNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::ExpiredToken(msg) => { + write!(_f, "ExpiredToken")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::InvalidToken(msg) => { + write!(_f, "InvalidToken")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::InvalidEmail(msg) => { + write!(_f, "InvalidEmail")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/create_account.rs b/crates/weaver-common/src/lexicons/com/atproto/server/create_account.rs new file mode 100644 index 0000000..c3d3c3a --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/create_account.rs @@ -0,0 +1,104 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.createAccount` namespace. +pub const NSID: &str = "com.atproto.server.createAccount"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Pre-existing atproto DID, being imported to a new account. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, + ///Requested handle for the account. + pub handle: atrium_api::types::string::Handle, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invite_code: core::option::Option, + ///Initial account password. May need to meet instance-specific password strength requirements. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub password: core::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 = "core::option::Option::is_none")] + pub plc_op: core::option::Option, + ///DID PLC rotation key (aka, recovery key) to be included in PLC creation operation. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub recovery_key: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verification_code: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verification_phone: core::option::Option, +} +pub type Input = atrium_api::types::Object; +///Account login session returned on successful account creation. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub access_jwt: String, + ///The DID of the new account. + pub did: atrium_api::types::string::Did, + ///Complete DID document. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did_doc: core::option::Option, + pub handle: atrium_api::types::string::Handle, + pub refresh_jwt: String, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + InvalidHandle(Option), + InvalidPassword(Option), + InvalidInviteCode(Option), + HandleNotAvailable(Option), + UnsupportedDomain(Option), + UnresolvableDid(Option), + IncompatibleDidDoc(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::InvalidHandle(msg) => { + write!(_f, "InvalidHandle")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::InvalidPassword(msg) => { + write!(_f, "InvalidPassword")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::InvalidInviteCode(msg) => { + write!(_f, "InvalidInviteCode")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::HandleNotAvailable(msg) => { + write!(_f, "HandleNotAvailable")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::UnsupportedDomain(msg) => { + write!(_f, "UnsupportedDomain")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::UnresolvableDid(msg) => { + write!(_f, "UnresolvableDid")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::IncompatibleDidDoc(msg) => { + write!(_f, "IncompatibleDidDoc")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/create_app_password.rs b/crates/weaver-common/src/lexicons/com/atproto/server/create_app_password.rs new file mode 100644 index 0000000..936e5dd --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/create_app_password.rs @@ -0,0 +1,42 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.createAppPassword` namespace. +pub const NSID: &str = "com.atproto.server.createAppPassword"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///A short name for the App Password, to help distinguish them. + pub name: String, + ///If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub privileged: core::option::Option, +} +pub type Input = atrium_api::types::Object; +pub type Output = AppPassword; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + AccountTakedown(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::AccountTakedown(msg) => { + write!(_f, "AccountTakedown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AppPasswordData { + pub created_at: atrium_api::types::string::Datetime, + pub name: String, + pub password: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub privileged: core::option::Option, +} +pub type AppPassword = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/create_invite_code.rs b/crates/weaver-common/src/lexicons/com/atproto/server/create_invite_code.rs new file mode 100644 index 0000000..d7e2741 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/create_invite_code.rs @@ -0,0 +1,25 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.createInviteCode` namespace. +pub const NSID: &str = "com.atproto.server.createInviteCode"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub for_account: core::option::Option, + pub use_count: i64, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub code: String, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/create_invite_codes.rs b/crates/weaver-common/src/lexicons/com/atproto/server/create_invite_codes.rs new file mode 100644 index 0000000..f3fcf07 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/create_invite_codes.rs @@ -0,0 +1,33 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.createInviteCodes` namespace. +pub const NSID: &str = "com.atproto.server.createInviteCodes"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub code_count: i64, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub for_accounts: core::option::Option>, + pub use_count: i64, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub codes: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AccountCodesData { + pub account: String, + pub codes: Vec, +} +pub type AccountCodes = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/create_session.rs b/crates/weaver-common/src/lexicons/com/atproto/server/create_session.rs new file mode 100644 index 0000000..ebd5e71 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/create_session.rs @@ -0,0 +1,63 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.createSession` namespace. +pub const NSID: &str = "com.atproto.server.createSession"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub allow_takendown: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub auth_factor_token: core::option::Option, + ///Handle or other identifier supported by the server for the authenticating user. + pub identifier: String, + pub password: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub access_jwt: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub active: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did_doc: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email_auth_factor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email_confirmed: core::option::Option, + pub handle: atrium_api::types::string::Handle, + pub refresh_jwt: String, + ///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 = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + AccountTakedown(Option), + AuthFactorTokenRequired(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::AccountTakedown(msg) => { + write!(_f, "AccountTakedown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::AuthFactorTokenRequired(msg) => { + write!(_f, "AuthFactorTokenRequired")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/deactivate_account.rs b/crates/weaver-common/src/lexicons/com/atproto/server/deactivate_account.rs new file mode 100644 index 0000000..ec465e1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/deactivate_account.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.deactivateAccount` namespace. +pub const NSID: &str = "com.atproto.server.deactivateAccount"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///A recommendation to server as to how long they should hold onto the deactivated account before deleting. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub delete_after: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/defs.rs b/crates/weaver-common/src/lexicons/com/atproto/server/defs.rs new file mode 100644 index 0000000..fd043b7 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/defs.rs @@ -0,0 +1,21 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InviteCodeData { + pub available: i64, + pub code: String, + pub created_at: atrium_api::types::string::Datetime, + pub created_by: String, + pub disabled: bool, + pub for_account: String, + pub uses: Vec, +} +pub type InviteCode = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InviteCodeUseData { + pub used_at: atrium_api::types::string::Datetime, + pub used_by: atrium_api::types::string::Did, +} +pub type InviteCodeUse = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/delete_account.rs b/crates/weaver-common/src/lexicons/com/atproto/server/delete_account.rs new file mode 100644 index 0000000..a98566e --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/delete_account.rs @@ -0,0 +1,36 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.deleteAccount` namespace. +pub const NSID: &str = "com.atproto.server.deleteAccount"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub did: atrium_api::types::string::Did, + pub password: String, + pub token: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ExpiredToken(Option), + InvalidToken(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::ExpiredToken(msg) => { + write!(_f, "ExpiredToken")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::InvalidToken(msg) => { + write!(_f, "InvalidToken")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/delete_session.rs b/crates/weaver-common/src/lexicons/com/atproto/server/delete_session.rs new file mode 100644 index 0000000..8ce2d7b --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/delete_session.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.deleteSession` namespace. +pub const NSID: &str = "com.atproto.server.deleteSession"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/describe_server.rs b/crates/weaver-common/src/lexicons/com/atproto/server/describe_server.rs new file mode 100644 index 0000000..e5efc0e --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/describe_server.rs @@ -0,0 +1,47 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.describeServer` namespace. +pub const NSID: &str = "com.atproto.server.describeServer"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///List of domain suffixes that can be used in account handles. + pub available_user_domains: Vec, + ///Contact information + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub contact: core::option::Option, + pub did: atrium_api::types::string::Did, + ///If true, an invite code must be supplied to create an account on this instance. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invite_code_required: core::option::Option, + ///URLs of service policy documents. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub links: core::option::Option, + ///If true, a phone verification token must be supplied to create an account on this instance. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub phone_verification_required: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ContactData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, +} +pub type Contact = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LinksData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub privacy_policy: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub terms_of_service: core::option::Option, +} +pub type Links = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/get_account_invite_codes.rs b/crates/weaver-common/src/lexicons/com/atproto/server/get_account_invite_codes.rs new file mode 100644 index 0000000..3020ad3 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/get_account_invite_codes.rs @@ -0,0 +1,37 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.getAccountInviteCodes` namespace. +pub const NSID: &str = "com.atproto.server.getAccountInviteCodes"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Controls whether any new 'earned' but not 'created' invites should be created. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub create_available: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub include_used: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub codes: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + DuplicateCreate(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::DuplicateCreate(msg) => { + write!(_f, "DuplicateCreate")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/get_service_auth.rs b/crates/weaver-common/src/lexicons/com/atproto/server/get_service_auth.rs new file mode 100644 index 0000000..20ef929 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/get_service_auth.rs @@ -0,0 +1,41 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.getServiceAuth` namespace. +pub const NSID: &str = "com.atproto.server.getServiceAuth"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The DID of the service that the token will be used to authenticate with + pub aud: atrium_api::types::string::Did, + ///The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub exp: core::option::Option, + ///Lexicon (XRPC) method to bind the requested token to + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lxm: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub token: String, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes. + BadExpiration(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::BadExpiration(msg) => { + write!(_f, "BadExpiration")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/get_session.rs b/crates/weaver-common/src/lexicons/com/atproto/server/get_session.rs new file mode 100644 index 0000000..4212676 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/get_session.rs @@ -0,0 +1,31 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.getSession` namespace. +pub const NSID: &str = "com.atproto.server.getSession"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub active: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did_doc: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email_auth_factor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email_confirmed: core::option::Option, + pub handle: atrium_api::types::string::Handle, + ///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 = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/list_app_passwords.rs b/crates/weaver-common/src/lexicons/com/atproto/server/list_app_passwords.rs new file mode 100644 index 0000000..3856d48 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/list_app_passwords.rs @@ -0,0 +1,36 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.listAppPasswords` namespace. +pub const NSID: &str = "com.atproto.server.listAppPasswords"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub passwords: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + AccountTakedown(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::AccountTakedown(msg) => { + write!(_f, "AccountTakedown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AppPasswordData { + pub created_at: atrium_api::types::string::Datetime, + pub name: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub privileged: core::option::Option, +} +pub type AppPassword = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/refresh_session.rs b/crates/weaver-common/src/lexicons/com/atproto/server/refresh_session.rs new file mode 100644 index 0000000..5bde010 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/refresh_session.rs @@ -0,0 +1,37 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.refreshSession` namespace. +pub const NSID: &str = "com.atproto.server.refreshSession"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub access_jwt: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub active: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did_doc: core::option::Option, + pub handle: atrium_api::types::string::Handle, + pub refresh_jwt: String, + ///Hosting status of the account. If not specified, then assume 'active'. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + AccountTakedown(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::AccountTakedown(msg) => { + write!(_f, "AccountTakedown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/request_account_delete.rs b/crates/weaver-common/src/lexicons/com/atproto/server/request_account_delete.rs new file mode 100644 index 0000000..c2949ea --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/request_account_delete.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.requestAccountDelete` namespace. +pub const NSID: &str = "com.atproto.server.requestAccountDelete"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/request_email_confirmation.rs b/crates/weaver-common/src/lexicons/com/atproto/server/request_email_confirmation.rs new file mode 100644 index 0000000..dda81d5 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/request_email_confirmation.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.requestEmailConfirmation` namespace. +pub const NSID: &str = "com.atproto.server.requestEmailConfirmation"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/request_email_update.rs b/crates/weaver-common/src/lexicons/com/atproto/server/request_email_update.rs new file mode 100644 index 0000000..fa7e8ab --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/request_email_update.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.requestEmailUpdate` namespace. +pub const NSID: &str = "com.atproto.server.requestEmailUpdate"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub token_required: bool, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/request_password_reset.rs b/crates/weaver-common/src/lexicons/com/atproto/server/request_password_reset.rs new file mode 100644 index 0000000..2714ed1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/request_password_reset.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.requestPasswordReset` namespace. +pub const NSID: &str = "com.atproto.server.requestPasswordReset"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub email: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/reserve_signing_key.rs b/crates/weaver-common/src/lexicons/com/atproto/server/reserve_signing_key.rs new file mode 100644 index 0000000..48a9983 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/reserve_signing_key.rs @@ -0,0 +1,26 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.reserveSigningKey` namespace. +pub const NSID: &str = "com.atproto.server.reserveSigningKey"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///The DID to reserve a key for. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///The public key for the reserved signing key, in did:key serialization. + pub signing_key: String, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/reset_password.rs b/crates/weaver-common/src/lexicons/com/atproto/server/reset_password.rs new file mode 100644 index 0000000..f3bdc16 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/reset_password.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.resetPassword` namespace. +pub const NSID: &str = "com.atproto.server.resetPassword"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub password: String, + pub token: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ExpiredToken(Option), + InvalidToken(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::ExpiredToken(msg) => { + write!(_f, "ExpiredToken")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::InvalidToken(msg) => { + write!(_f, "InvalidToken")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/revoke_app_password.rs b/crates/weaver-common/src/lexicons/com/atproto/server/revoke_app_password.rs new file mode 100644 index 0000000..ed9ed76 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/revoke_app_password.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.revokeAppPassword` namespace. +pub const NSID: &str = "com.atproto.server.revokeAppPassword"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub name: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/server/update_email.rs b/crates/weaver-common/src/lexicons/com/atproto/server/update_email.rs new file mode 100644 index 0000000..013bfd4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/server/update_email.rs @@ -0,0 +1,46 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.server.updateEmail` namespace. +pub const NSID: &str = "com.atproto.server.updateEmail"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub email: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email_auth_factor: core::option::Option, + ///Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub token: core::option::Option, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ExpiredToken(Option), + InvalidToken(Option), + TokenRequired(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::ExpiredToken(msg) => { + write!(_f, "ExpiredToken")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::InvalidToken(msg) => { + write!(_f, "InvalidToken")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::TokenRequired(msg) => { + write!(_f, "TokenRequired")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync.rs b/crates/weaver-common/src/lexicons/com/atproto/sync.rs new file mode 100644 index 0000000..2aaa782 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync` namespace. +pub mod defs; +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; diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/defs.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/defs.rs new file mode 100644 index 0000000..07ecde0 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/defs.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.defs` namespace. +pub type HostStatus = String; diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/get_blob.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/get_blob.rs new file mode 100644 index 0000000..991d8fc --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/get_blob.rs @@ -0,0 +1,58 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.getBlob` namespace. +pub const NSID: &str = "com.atproto.sync.getBlob"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The CID of the blob to fetch + pub cid: atrium_api::types::string::Cid, + ///The DID of the account. + pub did: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + BlobNotFound(Option), + RepoNotFound(Option), + RepoTakendown(Option), + RepoSuspended(Option), + RepoDeactivated(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::BlobNotFound(msg) => { + write!(_f, "BlobNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoNotFound(msg) => { + write!(_f, "RepoNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoTakendown(msg) => { + write!(_f, "RepoTakendown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoSuspended(msg) => { + write!(_f, "RepoSuspended")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoDeactivated(msg) => { + write!(_f, "RepoDeactivated")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/get_blocks.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/get_blocks.rs new file mode 100644 index 0000000..54855f4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/get_blocks.rs @@ -0,0 +1,57 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.getBlocks` namespace. +pub const NSID: &str = "com.atproto.sync.getBlocks"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub cids: Vec, + ///The DID of the repo. + pub did: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + BlockNotFound(Option), + RepoNotFound(Option), + RepoTakendown(Option), + RepoSuspended(Option), + RepoDeactivated(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::BlockNotFound(msg) => { + write!(_f, "BlockNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoNotFound(msg) => { + write!(_f, "RepoNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoTakendown(msg) => { + write!(_f, "RepoTakendown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoSuspended(msg) => { + write!(_f, "RepoSuspended")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoDeactivated(msg) => { + write!(_f, "RepoDeactivated")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/get_checkout.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/get_checkout.rs new file mode 100644 index 0000000..2e0af82 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/get_checkout.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.getCheckout` namespace. +pub const NSID: &str = "com.atproto.sync.getCheckout"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The DID of the repo. + pub did: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/get_head.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/get_head.rs new file mode 100644 index 0000000..3911bd2 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/get_head.rs @@ -0,0 +1,34 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.getHead` namespace. +pub const NSID: &str = "com.atproto.sync.getHead"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The DID of the repo. + pub did: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub root: atrium_api::types::string::Cid, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + HeadNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::HeadNotFound(msg) => { + write!(_f, "HeadNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/get_host_status.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/get_host_status.rs new file mode 100644 index 0000000..d807c37 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/get_host_status.rs @@ -0,0 +1,42 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.getHostStatus` namespace. +pub const NSID: &str = "com.atproto.sync.getHostStatus"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Hostname of the host (eg, PDS or relay) being queried. + pub hostname: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///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 = "core::option::Option::is_none")] + pub account_count: core::option::Option, + pub hostname: String, + ///Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub seq: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + HostNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::HostNotFound(msg) => { + write!(_f, "HostNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/get_latest_commit.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/get_latest_commit.rs new file mode 100644 index 0000000..f775c6e --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/get_latest_commit.rs @@ -0,0 +1,56 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.getLatestCommit` namespace. +pub const NSID: &str = "com.atproto.sync.getLatestCommit"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The DID of the repo. + pub did: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub cid: atrium_api::types::string::Cid, + pub rev: atrium_api::types::string::Tid, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + RepoNotFound(Option), + RepoTakendown(Option), + RepoSuspended(Option), + RepoDeactivated(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::RepoNotFound(msg) => { + write!(_f, "RepoNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoTakendown(msg) => { + write!(_f, "RepoTakendown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoSuspended(msg) => { + write!(_f, "RepoSuspended")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoDeactivated(msg) => { + write!(_f, "RepoDeactivated")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/get_record.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/get_record.rs new file mode 100644 index 0000000..9e99433 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/get_record.rs @@ -0,0 +1,59 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.getRecord` namespace. +pub const NSID: &str = "com.atproto.sync.getRecord"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub collection: atrium_api::types::string::Nsid, + ///The DID of the repo. + pub did: atrium_api::types::string::Did, + ///Record Key + pub rkey: atrium_api::types::string::RecordKey, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + RecordNotFound(Option), + RepoNotFound(Option), + RepoTakendown(Option), + RepoSuspended(Option), + RepoDeactivated(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::RecordNotFound(msg) => { + write!(_f, "RecordNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoNotFound(msg) => { + write!(_f, "RepoNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoTakendown(msg) => { + write!(_f, "RepoTakendown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoSuspended(msg) => { + write!(_f, "RepoSuspended")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoDeactivated(msg) => { + write!(_f, "RepoDeactivated")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/get_repo.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/get_repo.rs new file mode 100644 index 0000000..43a4691 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/get_repo.rs @@ -0,0 +1,52 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.getRepo` namespace. +pub const NSID: &str = "com.atproto.sync.getRepo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The DID of the repo. + pub did: atrium_api::types::string::Did, + ///The revision ('rev') of the repo to create a diff from. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + RepoNotFound(Option), + RepoTakendown(Option), + RepoSuspended(Option), + RepoDeactivated(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::RepoNotFound(msg) => { + write!(_f, "RepoNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoTakendown(msg) => { + write!(_f, "RepoTakendown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoSuspended(msg) => { + write!(_f, "RepoSuspended")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoDeactivated(msg) => { + write!(_f, "RepoDeactivated")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/get_repo_status.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/get_repo_status.rs new file mode 100644 index 0000000..b90f998 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/get_repo_status.rs @@ -0,0 +1,41 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.getRepoStatus` namespace. +pub const NSID: &str = "com.atproto.sync.getRepoStatus"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The DID of the repo. + pub did: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub active: bool, + pub did: atrium_api::types::string::Did, + ///Optional field, the current rev of the repo, if active=true + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rev: core::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 = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + RepoNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::RepoNotFound(msg) => { + write!(_f, "RepoNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/list_blobs.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/list_blobs.rs new file mode 100644 index 0000000..f2d3f48 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/list_blobs.rs @@ -0,0 +1,64 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.listBlobs` namespace. +pub const NSID: &str = "com.atproto.sync.listBlobs"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///The DID of the repo. + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Optional revision of the repo to list blobs since. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub cids: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + RepoNotFound(Option), + RepoTakendown(Option), + RepoSuspended(Option), + RepoDeactivated(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::RepoNotFound(msg) => { + write!(_f, "RepoNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoTakendown(msg) => { + write!(_f, "RepoTakendown")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoSuspended(msg) => { + write!(_f, "RepoSuspended")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::RepoDeactivated(msg) => { + write!(_f, "RepoDeactivated")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/list_hosts.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/list_hosts.rs new file mode 100644 index 0000000..4fd9f90 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/list_hosts.rs @@ -0,0 +1,43 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.listHosts` namespace. +pub const NSID: &str = "com.atproto.sync.listHosts"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first. + pub hosts: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct HostData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub account_count: core::option::Option, + ///hostname of server; not a URL (no scheme) + pub hostname: String, + ///Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub seq: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type Host = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/list_repos.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/list_repos.rs new file mode 100644 index 0000000..0a9bf9a --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/list_repos.rs @@ -0,0 +1,42 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.listRepos` namespace. +pub const NSID: &str = "com.atproto.sync.listRepos"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub repos: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RepoData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub active: core::option::Option, + pub did: atrium_api::types::string::Did, + ///Current repo commit CID + pub head: atrium_api::types::string::Cid, + pub rev: atrium_api::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 = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type Repo = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/list_repos_by_collection.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/list_repos_by_collection.rs new file mode 100644 index 0000000..9343acf --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/list_repos_by_collection.rs @@ -0,0 +1,36 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.listReposByCollection` namespace. +pub const NSID: &str = "com.atproto.sync.listReposByCollection"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub collection: atrium_api::types::string::Nsid, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub repos: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RepoData { + pub did: atrium_api::types::string::Did, +} +pub type Repo = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/notify_of_update.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/notify_of_update.rs new file mode 100644 index 0000000..7b29ad2 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/notify_of_update.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.notifyOfUpdate` namespace. +pub const NSID: &str = "com.atproto.sync.notifyOfUpdate"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Hostname of the current service (usually a PDS) that is notifying of update. + pub hostname: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/request_crawl.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/request_crawl.rs new file mode 100644 index 0000000..6e791ff --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/request_crawl.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.requestCrawl` namespace. +pub const NSID: &str = "com.atproto.sync.requestCrawl"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Hostname of the current service (eg, PDS) that is requesting to be crawled. + pub hostname: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + HostBanned(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::HostBanned(msg) => { + write!(_f, "HostBanned")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/sync/subscribe_repos.rs b/crates/weaver-common/src/lexicons/com/atproto/sync/subscribe_repos.rs new file mode 100644 index 0000000..a74ae49 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/sync/subscribe_repos.rs @@ -0,0 +1,147 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.sync.subscribeRepos` namespace. +pub const NSID: &str = "com.atproto.sync.subscribeRepos"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///The last known event seq number to backfill from. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + FutureCursor(Option), + ///If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection. + ConsumerTooSlow(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::FutureCursor(msg) => { + write!(_f, "FutureCursor")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::ConsumerTooSlow(msg) => { + write!(_f, "ConsumerTooSlow")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} +///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. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AccountData { + ///Indicates that the account has a repository which can be fetched from the host that emitted this event. + pub active: bool, + pub did: atrium_api::types::string::Did, + pub seq: i64, + ///If active=false, this optional field indicates a reason for why the account is not active. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, + pub time: atrium_api::types::string::Datetime, +} +pub type Account = atrium_api::types::Object; +///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. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct CommitData { + 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. + #[serde(with = "serde_bytes")] + pub blocks: Vec, + ///Repo commit object CID. + pub commit: atrium_api::types::CidLink, + 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 = "core::option::Option::is_none")] + pub prev_data: core::option::Option, + ///DEPRECATED -- unused + pub rebase: bool, + ///The repo this event comes from. Note that all other message types name this field 'did'. + pub repo: atrium_api::types::string::Did, + ///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: atrium_api::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). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, + ///Timestamp of when this message was originally broadcast. + pub time: atrium_api::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, +} +pub type Commit = atrium_api::types::Object; +///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. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct IdentityData { + pub did: atrium_api::types::string::Did, + ///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 = "core::option::Option::is_none")] + pub handle: core::option::Option, + pub seq: i64, + pub time: atrium_api::types::string::Datetime, +} +pub type Identity = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InfoData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub message: core::option::Option, + pub name: String, +} +pub type Info = atrium_api::types::Object; +///A repo operation, ie a mutation of a single record. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RepoOpData { + pub action: String, + ///For creates and updates, the new record CID. For deletions, null. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + pub path: String, + ///For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub prev: core::option::Option, +} +pub type RepoOp = atrium_api::types::Object; +///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. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SyncData { + ///CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. + #[serde(with = "serde_bytes")] + pub blocks: Vec, + ///The account this repo event corresponds to. Must match that in the commit object. + pub did: atrium_api::types::string::Did, + ///The rev of the commit. This value must match that in the commit object. + pub rev: String, + ///The stream sequence number of this message. + pub seq: i64, + ///Timestamp of when this message was originally broadcast. + pub time: atrium_api::types::string::Datetime, +} +pub type Sync = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum Message { + #[serde(rename = "com.atproto.sync.subscribeRepos#commit")] + Commit(Box), + #[serde(rename = "com.atproto.sync.subscribeRepos#sync")] + Sync(Box), + #[serde(rename = "com.atproto.sync.subscribeRepos#identity")] + Identity(Box), + #[serde(rename = "com.atproto.sync.subscribeRepos#account")] + Account(Box), + #[serde(rename = "com.atproto.sync.subscribeRepos#info")] + Info(Box), +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/temp.rs b/crates/weaver-common/src/lexicons/com/atproto/temp.rs new file mode 100644 index 0000000..daafee4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/temp.rs @@ -0,0 +1,6 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.temp` namespace. +pub mod add_reserved_handle; +pub mod check_signup_queue; +pub mod fetch_labels; +pub mod request_phone_verification; diff --git a/crates/weaver-common/src/lexicons/com/atproto/temp/add_reserved_handle.rs b/crates/weaver-common/src/lexicons/com/atproto/temp/add_reserved_handle.rs new file mode 100644 index 0000000..8bd32e4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/temp/add_reserved_handle.rs @@ -0,0 +1,21 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.temp.addReservedHandle` namespace. +pub const NSID: &str = "com.atproto.temp.addReservedHandle"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub handle: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData {} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/temp/check_signup_queue.rs b/crates/weaver-common/src/lexicons/com/atproto/temp/check_signup_queue.rs new file mode 100644 index 0000000..5994de2 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/temp/check_signup_queue.rs @@ -0,0 +1,21 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.temp.checkSignupQueue` namespace. +pub const NSID: &str = "com.atproto.temp.checkSignupQueue"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub activated: bool, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub estimated_time_ms: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub place_in_queue: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/temp/fetch_labels.rs b/crates/weaver-common/src/lexicons/com/atproto/temp/fetch_labels.rs new file mode 100644 index 0000000..262a388 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/temp/fetch_labels.rs @@ -0,0 +1,26 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.temp.fetchLabels` namespace. +pub const NSID: &str = "com.atproto.temp.fetchLabels"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub labels: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/com/atproto/temp/request_phone_verification.rs b/crates/weaver-common/src/lexicons/com/atproto/temp/request_phone_verification.rs new file mode 100644 index 0000000..4b9e334 --- /dev/null +++ b/crates/weaver-common/src/lexicons/com/atproto/temp/request_phone_verification.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `com.atproto.temp.requestPhoneVerification` namespace. +pub const NSID: &str = "com.atproto.temp.requestPhoneVerification"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub phone_number: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/mod.rs b/crates/weaver-common/src/lexicons/mod.rs new file mode 100644 index 0000000..c279341 --- /dev/null +++ b/crates/weaver-common/src/lexicons/mod.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +pub mod record; +pub mod sh; diff --git a/crates/weaver-common/src/lexicons/record.rs b/crates/weaver-common/src/lexicons/record.rs new file mode 100644 index 0000000..6fa1456 --- /dev/null +++ b/crates/weaver-common/src/lexicons/record.rs @@ -0,0 +1,27 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!A collection of known record types. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum KnownRecord { + #[serde(rename = "sh.tangled.actor.profile")] + LexiconsShTangledActorProfile( + Box, + ), +} +impl From for KnownRecord { + fn from(record: crate::lexicons::sh::tangled::actor::profile::Record) -> Self { + KnownRecord::LexiconsShTangledActorProfile(Box::new(record)) + } +} +impl From for KnownRecord { + fn from( + record_data: crate::lexicons::sh::tangled::actor::profile::RecordData, + ) -> Self { + KnownRecord::LexiconsShTangledActorProfile(Box::new(record_data.into())) + } +} +impl Into for KnownRecord { + fn into(self) -> atrium_api::types::Unknown { + atrium_api::types::TryIntoUnknown::try_into_unknown(&self).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/sh.rs b/crates/weaver-common/src/lexicons/sh.rs new file mode 100644 index 0000000..26eec87 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh.rs @@ -0,0 +1,4 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh` namespace. +pub mod tangled; +pub mod weaver; diff --git a/crates/weaver-common/src/lexicons/sh/tangled.rs b/crates/weaver-common/src/lexicons/sh/tangled.rs new file mode 100644 index 0000000..7d5b4c8 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/tangled.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.tangled` namespace. +pub mod actor; diff --git a/crates/weaver-common/src/lexicons/sh/tangled/actor.rs b/crates/weaver-common/src/lexicons/sh/tangled/actor.rs new file mode 100644 index 0000000..64dcce4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/tangled/actor.rs @@ -0,0 +1,9 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.tangled.actor` namespace. +pub mod profile; +#[derive(Debug)] +pub struct Profile; +impl atrium_api::types::Collection for Profile { + const NSID: &'static str = "sh.tangled.actor.profile"; + type Record = profile::Record; +} diff --git a/crates/weaver-common/src/lexicons/sh/tangled/actor/profile.rs b/crates/weaver-common/src/lexicons/sh/tangled/actor/profile.rs new file mode 100644 index 0000000..181c781 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/tangled/actor/profile.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.tangled.actor.profile` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + ///Include link to this account on Bluesky. + pub bluesky: bool, + ///Free-form profile description text. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub links: core::option::Option>, + ///Free-form location text. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub location: core::option::Option, + ///Any ATURI, it is up to appviews to validate these fields. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub pinned_repositories: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub stats: core::option::Option>, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} diff --git a/crates/weaver-common/src/lexicons/sh/weaver.rs b/crates/weaver-common/src/lexicons/sh/weaver.rs new file mode 100644 index 0000000..25ebf64 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver.rs @@ -0,0 +1,5 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver` namespace. +pub mod actor; +pub mod embed; +pub mod notebook; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/actor.rs b/crates/weaver-common/src/lexicons/sh/weaver/actor.rs new file mode 100644 index 0000000..6370c2c --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/actor.rs @@ -0,0 +1,4 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.actor` namespace. +pub mod defs; +pub mod profile; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/actor/defs.rs b/crates/weaver-common/src/lexicons/sh/weaver/actor/defs.rs new file mode 100644 index 0000000..1d57067 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/actor/defs.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.actor.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProfileViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, + pub handle: atrium_api::types::string::Handle, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub indexed_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, +} +pub type ProfileView = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/actor/profile.rs b/crates/weaver-common/src/lexicons/sh/weaver/actor/profile.rs new file mode 100644 index 0000000..d60979f --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/actor/profile.rs @@ -0,0 +1,40 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.actor.profile` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + ///Small image to be displayed next to posts from account. AKA, 'profile picture' + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, + ///Include link to this account on Bluesky. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub bluesky: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + ///Free-form profile description text. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub links: core::option::Option>, + ///Free-form location text. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub location: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub pinned_post: core::option::Option, + ///Pronouns to use in user-generated content. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub pronouns: core::option::Option, + ///Include link to this account on Tangled. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub tangled: core::option::Option, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +pub type PronounsList = Vec; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/embed.rs b/crates/weaver-common/src/lexicons/sh/weaver/embed.rs new file mode 100644 index 0000000..54ed17b --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/embed.rs @@ -0,0 +1,7 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.embed` namespace. +pub mod defs; +pub mod images; +pub mod record_with_media; +pub mod records; +pub mod video; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/embed/defs.rs b/crates/weaver-common/src/lexicons/sh/weaver/embed/defs.rs new file mode 100644 index 0000000..4af7c83 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/embed/defs.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.embed.defs` namespace. +///Proportional size of the embed relative to the viewport in larger windows. The dimensions are percentage out of 100. Could we use more granularity? Maybe, but come on. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct PercentSizeData { + pub height: i64, + pub width: i64, +} +pub type PercentSize = atrium_api::types::Object; +///Pixel-exact embed size. The dimensions are logical pixels, subject to scaling, so 200px at X2 scale is 400px. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct PixelSizeData { + pub height: i64, + pub width: i64, +} +pub type PixelSize = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/embed/images.rs b/crates/weaver-common/src/lexicons/sh/weaver/embed/images.rs new file mode 100644 index 0000000..1187ce1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/embed/images.rs @@ -0,0 +1,32 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.embed.images` namespace. +//!A set of images embedded in a blog post. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + pub images: Vec, +} +pub type Main = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ImageData { + ///alt text description of the image + pub alt: String, + ///Blurhash string for the image, used for low-resolution placeholders. This must be a valid Blurhash string. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub blurhash: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub dimensions: core::option::Option>, + pub image: atrium_api::types::BlobRef, +} +pub type Image = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ImageDimensionsRefs { + #[serde(rename = "app.bsky.embed.defs#aspectRatio")] + AppBskyEmbedDefsAspectRatio(Box), + #[serde(rename = "sh.weaver.embed.defs#percentSize")] + ShWeaverEmbedDefsPercentSize(Box), + #[serde(rename = "sh.weaver.embed.defs#pixelSize")] + ShWeaverEmbedDefsPixelSize(Box), +} diff --git a/crates/weaver-common/src/lexicons/sh/weaver/embed/record_with_media.rs b/crates/weaver-common/src/lexicons/sh/weaver/embed/record_with_media.rs new file mode 100644 index 0000000..5983c67 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/embed/record_with_media.rs @@ -0,0 +1,61 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.embed.recordWithMedia` namespace. +//!A representation of a record embedded in a Weaver record (eg, a notebook entry), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + pub media: atrium_api::types::Union, + pub record: atrium_api::types::Union, +} +pub type Main = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewData { + pub media: atrium_api::types::Union, + pub record: atrium_api::types::Union, +} +pub type View = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum MainMediaRefs { + #[serde(rename = "sh.weaver.embed.images")] + ShWeaverEmbedImagesMain(Box), + #[serde(rename = "sh.weaver.embed.external")] + ShWeaverEmbedExternalMain(Box), + #[serde(rename = "app.bsky.embed.images")] + AppBskyEmbedImagesMain(Box), + #[serde(rename = "app.bsky.embed.video")] + AppBskyEmbedVideoMain(Box), + #[serde(rename = "app.bsky.embed.external")] + AppBskyEmbedExternalMain(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum MainRecordRefs { + #[serde(rename = "app.bsky.embed.record")] + AppBskyEmbedRecordMain(Box), + #[serde(rename = "sh.weaver.embed.record")] + ShWeaverEmbedRecordMain(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ViewMediaRefs { + #[serde(rename = "sh.weaver.embed.images#view")] + ShWeaverEmbedImagesView(Box), + #[serde(rename = "sh.weaver.embed.external#view")] + ShWeaverEmbedExternalView(Box), + #[serde(rename = "app.bsky.embed.images#view")] + AppBskyEmbedImagesView(Box), + #[serde(rename = "app.bsky.embed.video#view")] + AppBskyEmbedVideoView(Box), + #[serde(rename = "app.bsky.embed.external#view")] + AppBskyEmbedExternalView(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ViewRecordRefs { + #[serde(rename = "sh.weaver.embed.record#view")] + ShWeaverEmbedRecordView(Box), + #[serde(rename = "app.bsky.embed.record#view")] + AppBskyEmbedRecordView(Box), +} diff --git a/crates/weaver-common/src/lexicons/sh/weaver/embed/records.rs b/crates/weaver-common/src/lexicons/sh/weaver/embed/records.rs new file mode 100644 index 0000000..102b115 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/embed/records.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.embed.records` namespace. +//!A set of records embedded in a blog post. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + pub records: Vec, +} +pub type Main = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ExternalData { + pub description: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thumb: core::option::Option, + pub title: String, + pub uri: String, +} +pub type External = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewData { + pub external: ViewExternal, +} +pub type View = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewExternalData { + pub description: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thumb: core::option::Option, + pub title: String, + pub uri: String, +} +pub type ViewExternal = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/embed/video.rs b/crates/weaver-common/src/lexicons/sh/weaver/embed/video.rs new file mode 100644 index 0000000..98bca2b --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/embed/video.rs @@ -0,0 +1,37 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.embed.video` namespace. +//!A video embedded in a Weaver record (eg, a notebook entry). +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MainData { + ///Alt text description of the video, for accessibility. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub alt: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub aspect_ratio: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub captions: core::option::Option>, + ///The mp4 video file. May be up to 100mb, formerly limited to 50mb. + pub video: atrium_api::types::BlobRef, +} +pub type Main = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct CaptionData { + pub file: atrium_api::types::BlobRef, + pub lang: atrium_api::types::string::Language, +} +pub type Caption = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub alt: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub aspect_ratio: core::option::Option, + pub cid: atrium_api::types::string::Cid, + pub playlist: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thumbnail: core::option::Option, +} +pub type View = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/notebook.rs b/crates/weaver-common/src/lexicons/sh/weaver/notebook.rs new file mode 100644 index 0000000..1bf36c5 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/notebook.rs @@ -0,0 +1,5 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.notebook` namespace. +pub mod authors; +pub mod defs; +pub mod entry; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/notebook/authors.rs b/crates/weaver-common/src/lexicons/sh/weaver/notebook/authors.rs new file mode 100644 index 0000000..2e88342 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/notebook/authors.rs @@ -0,0 +1,40 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.notebook.authors` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + pub author_list: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +///A single author in a Weaver notebook. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AuthorListItemData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub index: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub profile: core::option::Option< + atrium_api::types::Union, + >, +} +pub type AuthorListItem = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum AuthorListItemProfileRefs { + #[serde(rename = "app.bsky.actor.defs#profileViewBasic")] + AppBskyActorDefsProfileViewBasic( + Box, + ), + #[serde(rename = "sh.weaver.actor.profile")] + ShWeaverActorProfileMain(Box), + #[serde(rename = "sh.tangled.actor.defs#profileView")] + ShTangledActorDefsProfileView(Box), +} diff --git a/crates/weaver-common/src/lexicons/sh/weaver/notebook/defs.rs b/crates/weaver-common/src/lexicons/sh/weaver/notebook/defs.rs new file mode 100644 index 0000000..bda72b4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/notebook/defs.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.notebook.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct EntryViewData { + pub cid: atrium_api::types::string::Cid, + pub uri: String, +} +pub type EntryView = atrium_api::types::Object; +///View of a rendered and cached notebook entry +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RenderedViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub css: core::option::Option, + pub html: atrium_api::types::BlobRef, +} +pub type RenderedView = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/sh/weaver/notebook/entry.rs b/crates/weaver-common/src/lexicons/sh/weaver/notebook/entry.rs new file mode 100644 index 0000000..987385b --- /dev/null +++ b/crates/weaver-common/src/lexicons/sh/weaver/notebook/entry.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `sh.weaver.notebook.entry` namespace. +use atrium_api::types::TryFromUnknown; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordData { + ///The content of the notebook entry. This should be some flavor of Markdown. + pub content: String, + pub created_at: CreatedAt, + ///The set of images, if any, embedded in the notebook entry. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub images: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub tags: core::option::Option, + pub title: Title, +} +pub type Record = atrium_api::types::Object; +impl From for RecordData { + fn from(value: atrium_api::types::Unknown) -> Self { + Self::try_from_unknown(value).unwrap() + } +} +///The date and time when the notebook entry was created. This is used for sorting and displaying the entry's creation date. +pub type CreatedAt = String; +///An array of tags associated with the notebook entry. Tags can help categorize and organize entries. +pub type Tags = Vec; +///The title of the notebook entry. +pub type Title = String; diff --git a/crates/weaver-common/src/lexicons/tools.rs b/crates/weaver-common/src/lexicons/tools.rs new file mode 100644 index 0000000..fa1e1fc --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools` namespace. +pub mod ozone; diff --git a/crates/weaver-common/src/lexicons/tools/ozone.rs b/crates/weaver-common/src/lexicons/tools/ozone.rs new file mode 100644 index 0000000..ded13c1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone.rs @@ -0,0 +1,11 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone` namespace. +pub mod communication; +pub mod hosting; +pub mod moderation; +pub mod server; +pub mod set; +pub mod setting; +pub mod signature; +pub mod team; +pub mod verification; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/communication.rs b/crates/weaver-common/src/lexicons/tools/ozone/communication.rs new file mode 100644 index 0000000..e41a76b --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/communication.rs @@ -0,0 +1,7 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.communication` namespace. +pub mod create_template; +pub mod defs; +pub mod delete_template; +pub mod list_templates; +pub mod update_template; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/communication/create_template.rs b/crates/weaver-common/src/lexicons/tools/ozone/communication/create_template.rs new file mode 100644 index 0000000..4ff278b --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/communication/create_template.rs @@ -0,0 +1,39 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.communication.createTemplate` namespace. +pub const NSID: &str = "tools.ozone.communication.createTemplate"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Content of the template, markdown supported, can contain variable placeholders. + pub content_markdown: String, + ///DID of the user who is creating the template. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_by: core::option::Option, + ///Message language. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lang: core::option::Option, + ///Name of the template. + pub name: String, + ///Subject of the message, used in emails. + pub subject: String, +} +pub type Input = atrium_api::types::Object; +pub type Output = crate::tools::ozone::communication::defs::TemplateView; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + DuplicateTemplateName(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::DuplicateTemplateName(msg) => { + write!(_f, "DuplicateTemplateName")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/communication/defs.rs b/crates/weaver-common/src/lexicons/tools/ozone/communication/defs.rs new file mode 100644 index 0000000..976fb91 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/communication/defs.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.communication.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct TemplateViewData { + ///Subject of the message, used in emails. + pub content_markdown: String, + pub created_at: atrium_api::types::string::Datetime, + pub disabled: bool, + pub id: String, + ///Message language. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lang: core::option::Option, + ///DID of the user who last updated the template. + pub last_updated_by: atrium_api::types::string::Did, + ///Name of the template. + pub name: String, + ///Content of the template, can contain markdown and variable placeholders. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject: core::option::Option, + pub updated_at: atrium_api::types::string::Datetime, +} +pub type TemplateView = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/communication/delete_template.rs b/crates/weaver-common/src/lexicons/tools/ozone/communication/delete_template.rs new file mode 100644 index 0000000..60d6b48 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/communication/delete_template.rs @@ -0,0 +1,17 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.communication.deleteTemplate` namespace. +pub const NSID: &str = "tools.ozone.communication.deleteTemplate"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub id: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/communication/list_templates.rs b/crates/weaver-common/src/lexicons/tools/ozone/communication/list_templates.rs new file mode 100644 index 0000000..8ef3239 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/communication/list_templates.rs @@ -0,0 +1,19 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.communication.listTemplates` namespace. +pub const NSID: &str = "tools.ozone.communication.listTemplates"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub communication_templates: Vec< + crate::tools::ozone::communication::defs::TemplateView, + >, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/communication/update_template.rs b/crates/weaver-common/src/lexicons/tools/ozone/communication/update_template.rs new file mode 100644 index 0000000..02c46a7 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/communication/update_template.rs @@ -0,0 +1,46 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.communication.updateTemplate` namespace. +pub const NSID: &str = "tools.ozone.communication.updateTemplate"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Content of the template, markdown supported, can contain variable placeholders. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub content_markdown: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub disabled: core::option::Option, + ///ID of the template to be updated. + pub id: String, + ///Message language. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lang: core::option::Option, + ///Name of the template. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub name: core::option::Option, + ///Subject of the message, used in emails. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject: core::option::Option, + ///DID of the user who is updating the template. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_by: core::option::Option, +} +pub type Input = atrium_api::types::Object; +pub type Output = crate::tools::ozone::communication::defs::TemplateView; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + DuplicateTemplateName(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::DuplicateTemplateName(msg) => { + write!(_f, "DuplicateTemplateName")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/hosting.rs b/crates/weaver-common/src/lexicons/tools/ozone/hosting.rs new file mode 100644 index 0000000..db5e4f8 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/hosting.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.hosting` namespace. +pub mod get_account_history; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/hosting/get_account_history.rs b/crates/weaver-common/src/lexicons/tools/ozone/hosting/get_account_history.rs new file mode 100644 index 0000000..5f8d0f1 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/hosting/get_account_history.rs @@ -0,0 +1,84 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.hosting.getAccountHistory` namespace. +pub const NSID: &str = "tools.ozone.hosting.getAccountHistory"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub events: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub events: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AccountCreatedData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub handle: core::option::Option, +} +pub type AccountCreated = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct EmailConfirmedData { + pub email: String, +} +pub type EmailConfirmed = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct EmailUpdatedData { + pub email: String, +} +pub type EmailUpdated = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct EventData { + pub created_at: atrium_api::types::string::Datetime, + pub created_by: String, + pub details: atrium_api::types::Union, +} +pub type Event = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct HandleUpdatedData { + pub handle: atrium_api::types::string::Handle, +} +pub type HandleUpdated = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct PasswordUpdatedData {} +pub type PasswordUpdated = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum EventDetailsRefs { + #[serde(rename = "tools.ozone.hosting.getAccountHistory#accountCreated")] + AccountCreated(Box), + #[serde(rename = "tools.ozone.hosting.getAccountHistory#emailUpdated")] + EmailUpdated(Box), + #[serde(rename = "tools.ozone.hosting.getAccountHistory#emailConfirmed")] + EmailConfirmed(Box), + #[serde(rename = "tools.ozone.hosting.getAccountHistory#passwordUpdated")] + PasswordUpdated(Box), + #[serde(rename = "tools.ozone.hosting.getAccountHistory#handleUpdated")] + HandleUpdated(Box), +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation.rs new file mode 100644 index 0000000..17adcc0 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation.rs @@ -0,0 +1,14 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation` namespace. +pub mod defs; +pub mod emit_event; +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; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/defs.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/defs.rs new file mode 100644 index 0000000..b4da66f --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/defs.rs @@ -0,0 +1,690 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.defs` namespace. +///Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AccountEventData { + ///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 = "core::option::Option::is_none")] + pub comment: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, + pub timestamp: atrium_api::types::string::Datetime, +} +pub type AccountEvent = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AccountHostingData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deleted_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reactivated_at: core::option::Option, + pub status: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_at: core::option::Option, +} +pub type AccountHosting = atrium_api::types::Object; +///Statistics about a particular account subject +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AccountStatsData { + ///Total number of appeals against a moderation action on the account + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub appeal_count: core::option::Option, + ///Number of times the account was escalated + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub escalate_count: core::option::Option, + ///Total number of reports on the account + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub report_count: core::option::Option, + ///Number of times the account was suspended + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub suspend_count: core::option::Option, + ///Number of times the account was taken down + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takedown_count: core::option::Option, +} +pub type AccountStats = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct BlobViewData { + pub cid: atrium_api::types::string::Cid, + pub created_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub details: core::option::Option>, + pub mime_type: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub moderation: core::option::Option, + pub size: i64, +} +pub type BlobView = atrium_api::types::Object; +///Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct IdentityEventData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub handle: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub pds_host: core::option::Option, + pub timestamp: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub tombstone: core::option::Option, +} +pub type IdentityEvent = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ImageDetailsData { + pub height: i64, + pub width: i64, +} +pub type ImageDetails = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventAcknowledgeData { + ///If true, all other reports on content authored by this account will be resolved (acknowledged). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub acknowledge_account_subjects: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, +} +pub type ModEventAcknowledge = atrium_api::types::Object; +///Add a comment to a subject. An empty comment will clear any previously set sticky comment. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventCommentData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + ///Make the comment persistent on the subject + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sticky: core::option::Option, +} +pub type ModEventComment = atrium_api::types::Object; +///Divert a record's blobs to a 3rd party service for further scanning/tagging +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventDivertData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, +} +pub type ModEventDivert = atrium_api::types::Object; +///Keep a log of outgoing email to a user +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventEmailData { + ///Additional comment about the outgoing comm. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + ///The content of the email sent to the user. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub content: core::option::Option, + ///The subject line of the email sent to the user. + pub subject_line: String, +} +pub type ModEventEmail = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventEscalateData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, +} +pub type ModEventEscalate = atrium_api::types::Object; +///Apply/Negate labels on a subject +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventLabelData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + 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 = "core::option::Option::is_none")] + pub duration_in_hours: core::option::Option, + pub negate_label_vals: Vec, +} +pub type ModEventLabel = atrium_api::types::Object; +///Mute incoming reports on a subject +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventMuteData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + ///Indicates how long the subject should remain muted. + pub duration_in_hours: i64, +} +pub type ModEventMute = atrium_api::types::Object; +///Mute incoming reports from an account +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventMuteReporterData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + ///Indicates how long the account should remain muted. Falsy value here means a permanent mute. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub duration_in_hours: core::option::Option, +} +pub type ModEventMuteReporter = atrium_api::types::Object; +///Set priority score of the subject. Higher score means higher priority. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventPriorityScoreData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + pub score: atrium_api::types::LimitedU8<100u8>, +} +pub type ModEventPriorityScore = atrium_api::types::Object; +///Report a subject +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventReportData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::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 = "core::option::Option::is_none")] + pub is_reporter_muted: core::option::Option, + pub report_type: crate::com::atproto::moderation::defs::ReasonType, +} +pub type ModEventReport = atrium_api::types::Object; +///Resolve appeal on a subject +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventResolveAppealData { + ///Describe resolution. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, +} +pub type ModEventResolveAppeal = atrium_api::types::Object; +///Revert take down action on a subject +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventReverseTakedownData { + ///Describe reasoning behind the reversal. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, +} +pub type ModEventReverseTakedown = atrium_api::types::Object< + ModEventReverseTakedownData, +>; +///Add/Remove a tag on a subject +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventTagData { + ///Tags to be added to the subject. If already exists, won't be duplicated. + pub add: Vec, + ///Additional comment about added/removed tags. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + ///Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. + pub remove: Vec, +} +pub type ModEventTag = atrium_api::types::Object; +///Take down a subject permanently or temporarily +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventTakedownData { + ///If true, all other reports on content authored by this account will be resolved (acknowledged). + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub acknowledge_account_subjects: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + ///Indicates how long the takedown should be in effect before automatically expiring. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub duration_in_hours: core::option::Option, + ///Names/Keywords of the policies that drove the decision. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub policies: core::option::Option>, +} +pub type ModEventTakedown = atrium_api::types::Object; +///Unmute action on a subject +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventUnmuteData { + ///Describe reasoning behind the reversal. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, +} +pub type ModEventUnmute = atrium_api::types::Object; +///Unmute incoming reports from an account +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventUnmuteReporterData { + ///Describe reasoning behind the reversal. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, +} +pub type ModEventUnmuteReporter = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventViewData { + pub created_at: atrium_api::types::string::Datetime, + pub created_by: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub creator_handle: core::option::Option, + pub event: atrium_api::types::Union, + pub id: i64, + pub subject: atrium_api::types::Union, + pub subject_blob_cids: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_handle: core::option::Option, +} +pub type ModEventView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModEventViewDetailData { + pub created_at: atrium_api::types::string::Datetime, + pub created_by: atrium_api::types::string::Did, + pub event: atrium_api::types::Union, + pub id: i64, + pub subject: atrium_api::types::Union, + pub subject_blobs: Vec, +} +pub type ModEventViewDetail = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModerationData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_status: core::option::Option, +} +pub type Moderation = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ModerationDetailData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_status: core::option::Option, +} +pub type ModerationDetail = atrium_api::types::Object; +///Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordEventData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + pub op: String, + pub timestamp: atrium_api::types::string::Datetime, +} +pub type RecordEvent = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordHostingData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deleted_at: core::option::Option, + pub status: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_at: core::option::Option, +} +pub type RecordHosting = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordViewData { + pub blob_cids: Vec, + pub cid: atrium_api::types::string::Cid, + pub indexed_at: atrium_api::types::string::Datetime, + pub moderation: Moderation, + pub repo: RepoView, + pub uri: String, + pub value: atrium_api::types::Unknown, +} +pub type RecordView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordViewDetailData { + pub blobs: Vec, + pub cid: atrium_api::types::string::Cid, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + pub moderation: ModerationDetail, + pub repo: RepoView, + pub uri: String, + pub value: atrium_api::types::Unknown, +} +pub type RecordViewDetail = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordViewNotFoundData { + pub uri: String, +} +pub type RecordViewNotFound = atrium_api::types::Object; +///Statistics about a set of record subject items +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordsStatsData { + ///Number of items that were appealed at least once + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub appealed_count: core::option::Option, + ///Number of items that were escalated at least once + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub escalated_count: core::option::Option, + ///Number of item currently in "reviewOpen" or "reviewEscalated" state + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub pending_count: core::option::Option, + ///Number of item currently in "reviewNone" or "reviewClosed" state + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub processed_count: core::option::Option, + ///Number of items that were reported at least once + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reported_count: core::option::Option, + ///Total number of item in the set + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_count: core::option::Option, + ///Number of item currently taken down + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takendown_count: core::option::Option, + ///Cumulative sum of the number of reports on the items in the set + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub total_reports: core::option::Option, +} +pub type RecordsStats = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RepoViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated_at: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, + pub handle: atrium_api::types::string::Handle, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invite_note: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invited_by: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invites_disabled: core::option::Option, + pub moderation: Moderation, + pub related_records: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub threat_signatures: core::option::Option< + Vec, + >, +} +pub type RepoView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RepoViewDetailData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated_at: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email_confirmed_at: core::option::Option, + pub handle: atrium_api::types::string::Handle, + pub indexed_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invite_note: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invited_by: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invites: core::option::Option< + Vec, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub invites_disabled: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, + pub moderation: ModerationDetail, + pub related_records: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub threat_signatures: core::option::Option< + Vec, + >, +} +pub type RepoViewDetail = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RepoViewNotFoundData { + pub did: atrium_api::types::string::Did, +} +pub type RepoViewNotFound = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ReporterStatsData { + ///The total number of reports made by the user on accounts. + pub account_report_count: i64, + pub did: atrium_api::types::string::Did, + ///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, +} +pub type ReporterStats = atrium_api::types::Object; +///Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator +pub const REVIEW_CLOSED: &str = "tools.ozone.moderation.defs#reviewClosed"; +///Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator +pub const REVIEW_ESCALATED: &str = "tools.ozone.moderation.defs#reviewEscalated"; +///Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it +pub const REVIEW_NONE: &str = "tools.ozone.moderation.defs#reviewNone"; +///Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator +pub const REVIEW_OPEN: &str = "tools.ozone.moderation.defs#reviewOpen"; +pub type SubjectReviewState = String; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SubjectStatusViewData { + ///Statistics related to the account subject + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub account_stats: core::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 = "core::option::Option::is_none")] + pub appealed: core::option::Option, + ///Sticky comment on the subject. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + ///Timestamp referencing the first moderation status impacting event was emitted on the subject + pub created_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hosting: core::option::Option< + atrium_api::types::Union, + >, + pub id: i64, + ///Timestamp referencing when the author of the subject appealed a moderation action + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub last_appealed_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub last_reported_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub last_reviewed_at: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub last_reviewed_by: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub mute_reporting_until: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub mute_until: core::option::Option, + ///Numeric value representing the level of priority. Higher score means higher priority. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub priority_score: core::option::Option>, + ///Statistics related to the record subjects authored by the subject's account + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub records_stats: core::option::Option, + pub review_state: SubjectReviewState, + pub subject: atrium_api::types::Union, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_blob_cids: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_repo_handle: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub suspend_until: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub tags: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takendown: core::option::Option, + ///Timestamp referencing when the last update was made to the moderation status of the subject + pub updated_at: atrium_api::types::string::Datetime, +} +pub type SubjectStatusView = atrium_api::types::Object; +///Detailed view of a subject. For record subjects, the author's repo and profile will be returned. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SubjectViewData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub profile: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub record: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub repo: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, + pub subject: String, + pub r#type: crate::com::atproto::moderation::defs::SubjectType, +} +pub type SubjectView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct VideoDetailsData { + pub height: i64, + pub length: i64, + pub width: i64, +} +pub type VideoDetails = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum BlobViewDetailsRefs { + #[serde(rename = "tools.ozone.moderation.defs#imageDetails")] + ImageDetails(Box), + #[serde(rename = "tools.ozone.moderation.defs#videoDetails")] + VideoDetails(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ModEventViewDetailEventRefs { + #[serde(rename = "tools.ozone.moderation.defs#modEventTakedown")] + ModEventTakedown(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventReverseTakedown")] + ModEventReverseTakedown(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventComment")] + ModEventComment(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventReport")] + ModEventReport(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventLabel")] + ModEventLabel(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventAcknowledge")] + ModEventAcknowledge(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventEscalate")] + ModEventEscalate(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventMute")] + ModEventMute(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventUnmute")] + ModEventUnmute(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventMuteReporter")] + ModEventMuteReporter(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventUnmuteReporter")] + ModEventUnmuteReporter(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventEmail")] + ModEventEmail(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventResolveAppeal")] + ModEventResolveAppeal(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventDivert")] + ModEventDivert(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventTag")] + ModEventTag(Box), + #[serde(rename = "tools.ozone.moderation.defs#accountEvent")] + AccountEvent(Box), + #[serde(rename = "tools.ozone.moderation.defs#identityEvent")] + IdentityEvent(Box), + #[serde(rename = "tools.ozone.moderation.defs#recordEvent")] + RecordEvent(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventPriorityScore")] + ModEventPriorityScore(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ModEventViewDetailSubjectRefs { + #[serde(rename = "tools.ozone.moderation.defs#repoView")] + RepoView(Box), + #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] + RepoViewNotFound(Box), + #[serde(rename = "tools.ozone.moderation.defs#recordView")] + RecordView(Box), + #[serde(rename = "tools.ozone.moderation.defs#recordViewNotFound")] + RecordViewNotFound(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ModEventViewEventRefs { + #[serde(rename = "tools.ozone.moderation.defs#modEventTakedown")] + ModEventTakedown(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventReverseTakedown")] + ModEventReverseTakedown(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventComment")] + ModEventComment(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventReport")] + ModEventReport(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventLabel")] + ModEventLabel(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventAcknowledge")] + ModEventAcknowledge(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventEscalate")] + ModEventEscalate(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventMute")] + ModEventMute(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventUnmute")] + ModEventUnmute(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventMuteReporter")] + ModEventMuteReporter(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventUnmuteReporter")] + ModEventUnmuteReporter(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventEmail")] + ModEventEmail(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventResolveAppeal")] + ModEventResolveAppeal(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventDivert")] + ModEventDivert(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventTag")] + ModEventTag(Box), + #[serde(rename = "tools.ozone.moderation.defs#accountEvent")] + AccountEvent(Box), + #[serde(rename = "tools.ozone.moderation.defs#identityEvent")] + IdentityEvent(Box), + #[serde(rename = "tools.ozone.moderation.defs#recordEvent")] + RecordEvent(Box), + #[serde(rename = "tools.ozone.moderation.defs#modEventPriorityScore")] + ModEventPriorityScore(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum ModEventViewSubjectRefs { + #[serde(rename = "com.atproto.admin.defs#repoRef")] + ComAtprotoAdminDefsRepoRef(Box), + #[serde(rename = "com.atproto.repo.strongRef")] + ComAtprotoRepoStrongRefMain(Box), + #[serde(rename = "chat.bsky.convo.defs#messageRef")] + ChatBskyConvoDefsMessageRef(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum SubjectStatusViewHostingRefs { + #[serde(rename = "tools.ozone.moderation.defs#accountHosting")] + AccountHosting(Box), + #[serde(rename = "tools.ozone.moderation.defs#recordHosting")] + RecordHosting(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum SubjectStatusViewSubjectRefs { + #[serde(rename = "com.atproto.admin.defs#repoRef")] + ComAtprotoAdminDefsRepoRef(Box), + #[serde(rename = "com.atproto.repo.strongRef")] + ComAtprotoRepoStrongRefMain(Box), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum SubjectViewProfileRefs {} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/emit_event.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/emit_event.rs new file mode 100644 index 0000000..bc205bb --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/emit_event.rs @@ -0,0 +1,120 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.emitEvent` namespace. +pub const NSID: &str = "tools.ozone.moderation.emitEvent"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub created_by: atrium_api::types::string::Did, + pub event: atrium_api::types::Union, + pub subject: atrium_api::types::Union, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_blob_cids: core::option::Option>, +} +pub type Input = atrium_api::types::Object; +pub type Output = crate::tools::ozone::moderation::defs::ModEventView; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + SubjectHasAction(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::SubjectHasAction(msg) => { + write!(_f, "SubjectHasAction")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum InputEventRefs { + #[serde(rename = "tools.ozone.moderation.defs#modEventTakedown")] + ToolsOzoneModerationDefsModEventTakedown( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventAcknowledge")] + ToolsOzoneModerationDefsModEventAcknowledge( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventEscalate")] + ToolsOzoneModerationDefsModEventEscalate( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventComment")] + ToolsOzoneModerationDefsModEventComment( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventLabel")] + ToolsOzoneModerationDefsModEventLabel( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventReport")] + ToolsOzoneModerationDefsModEventReport( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventMute")] + ToolsOzoneModerationDefsModEventMute( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventUnmute")] + ToolsOzoneModerationDefsModEventUnmute( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventMuteReporter")] + ToolsOzoneModerationDefsModEventMuteReporter( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventUnmuteReporter")] + ToolsOzoneModerationDefsModEventUnmuteReporter( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventReverseTakedown")] + ToolsOzoneModerationDefsModEventReverseTakedown( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventResolveAppeal")] + ToolsOzoneModerationDefsModEventResolveAppeal( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventEmail")] + ToolsOzoneModerationDefsModEventEmail( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventDivert")] + ToolsOzoneModerationDefsModEventDivert( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventTag")] + ToolsOzoneModerationDefsModEventTag( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#accountEvent")] + ToolsOzoneModerationDefsAccountEvent( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#identityEvent")] + ToolsOzoneModerationDefsIdentityEvent( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#recordEvent")] + ToolsOzoneModerationDefsRecordEvent( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#modEventPriorityScore")] + ToolsOzoneModerationDefsModEventPriorityScore( + Box, + ), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum InputSubjectRefs { + #[serde(rename = "com.atproto.admin.defs#repoRef")] + ComAtprotoAdminDefsRepoRef(Box), + #[serde(rename = "com.atproto.repo.strongRef")] + ComAtprotoRepoStrongRefMain(Box), +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_event.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_event.rs new file mode 100644 index 0000000..2f72078 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_event.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.getEvent` namespace. +pub const NSID: &str = "tools.ozone.moderation.getEvent"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub id: i64, +} +pub type Parameters = atrium_api::types::Object; +pub type Output = crate::tools::ozone::moderation::defs::ModEventViewDetail; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_record.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_record.rs new file mode 100644 index 0000000..7797091 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_record.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.getRecord` namespace. +pub const NSID: &str = "tools.ozone.moderation.getRecord"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, + pub uri: String, +} +pub type Parameters = atrium_api::types::Object; +pub type Output = crate::tools::ozone::moderation::defs::RecordViewDetail; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + RecordNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::RecordNotFound(msg) => { + write!(_f, "RecordNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_records.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_records.rs new file mode 100644 index 0000000..dc2ab85 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_records.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.getRecords` namespace. +pub const NSID: &str = "tools.ozone.moderation.getRecords"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub uris: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub records: Vec>, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputRecordsItem { + #[serde(rename = "tools.ozone.moderation.defs#recordViewDetail")] + ToolsOzoneModerationDefsRecordViewDetail( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#recordViewNotFound")] + ToolsOzoneModerationDefsRecordViewNotFound( + Box, + ), +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_repo.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_repo.rs new file mode 100644 index 0000000..ea426a0 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_repo.rs @@ -0,0 +1,28 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.getRepo` namespace. +pub const NSID: &str = "tools.ozone.moderation.getRepo"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub did: atrium_api::types::string::Did, +} +pub type Parameters = atrium_api::types::Object; +pub type Output = crate::tools::ozone::moderation::defs::RepoViewDetail; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + RepoNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::RepoNotFound(msg) => { + write!(_f, "RepoNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_reporter_stats.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_reporter_stats.rs new file mode 100644 index 0000000..f0c4ad2 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_reporter_stats.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.getReporterStats` namespace. +pub const NSID: &str = "tools.ozone.moderation.getReporterStats"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub dids: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub stats: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_repos.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_repos.rs new file mode 100644 index 0000000..67a2ea2 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_repos.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.getRepos` namespace. +pub const NSID: &str = "tools.ozone.moderation.getRepos"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub dids: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub repos: Vec>, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum OutputReposItem { + #[serde(rename = "tools.ozone.moderation.defs#repoViewDetail")] + ToolsOzoneModerationDefsRepoViewDetail( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] + ToolsOzoneModerationDefsRepoViewNotFound( + Box, + ), +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_subjects.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_subjects.rs new file mode 100644 index 0000000..3919fd7 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/get_subjects.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.getSubjects` namespace. +pub const NSID: &str = "tools.ozone.moderation.getSubjects"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub subjects: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub subjects: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/query_events.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/query_events.rs new file mode 100644 index 0000000..b6a740f --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/query_events.rs @@ -0,0 +1,75 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.queryEvents` namespace. +pub const NSID: &str = "tools.ozone.moderation.queryEvents"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///If specified, only events where all of these labels were added are returned + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub added_labels: core::option::Option>, + ///If specified, only events where all of these tags were added are returned + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub added_tags: core::option::Option>, + ///If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub collections: core::option::Option>, + ///If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + ///Retrieve events created after a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_after: core::option::Option, + ///Retrieve events created before a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_before: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_by: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///If true, only events with comments are returned + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub has_comment: core::option::Option, + ///If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub include_all_user_records: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub policies: core::option::Option>, + ///If specified, only events where all of these labels were removed are returned + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub removed_labels: core::option::Option>, + ///If specified, only events where all of these tags were removed are returned + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub removed_tags: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub report_types: core::option::Option>, + ///Sort direction for the events. Defaults to descending order of created at timestamp. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort_direction: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject: core::option::Option, + ///If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_type: core::option::Option, + ///The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent) to filter by. If not specified, all events are returned. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub types: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub events: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/query_statuses.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/query_statuses.rs new file mode 100644 index 0000000..8ce0878 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/query_statuses.rs @@ -0,0 +1,123 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.queryStatuses` namespace. +pub const NSID: &str = "tools.ozone.moderation.queryStatuses"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Get subjects in unresolved appealed status + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub appealed: core::option::Option, + ///If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub collections: core::option::Option>, + ///Search subjects by keyword from comments + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub exclude_tags: core::option::Option>, + ///Search subjects where the associated record/account was deleted after a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hosting_deleted_after: core::option::Option, + ///Search subjects where the associated record/account was deleted before a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hosting_deleted_before: core::option::Option< + atrium_api::types::string::Datetime, + >, + ///Search subjects by the status of the associated record/account + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hosting_statuses: core::option::Option>, + ///Search subjects where the associated record/account was updated after a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hosting_updated_after: core::option::Option, + ///Search subjects where the associated record/account was updated before a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hosting_updated_before: core::option::Option< + atrium_api::types::string::Datetime, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub ignore_subjects: core::option::Option>, + ///All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub include_all_user_records: core::option::Option, + ///By default, we don't include muted subjects in the results. Set this to true to include them. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub include_muted: core::option::Option, + ///Get all subject statuses that were reviewed by a specific moderator + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub last_reviewed_by: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///If specified, only subjects that belong to an account that has at least this many suspensions will be returned. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub min_account_suspend_count: core::option::Option, + ///If specified, only subjects that have priority score value above the given value will be returned. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub min_priority_score: core::option::Option>, + ///If specified, only subjects that belong to an account that has at least this many reported records will be returned. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub min_reported_records_count: core::option::Option, + ///If specified, only subjects that belong to an account that has at least this many taken down records will be returned. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub min_takendown_records_count: core::option::Option, + ///When set to true, only muted subjects and reporters will be returned. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub only_muted: core::option::Option, + ///Number of queues being used by moderators. Subjects will be split among all queues. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub queue_count: core::option::Option, + ///Index of the queue to fetch subjects from. Works only when queueCount value is specified. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub queue_index: core::option::Option, + ///A seeder to shuffle/balance the queue items. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub queue_seed: core::option::Option, + ///Search subjects reported after a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reported_after: core::option::Option, + ///Search subjects reported before a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reported_before: core::option::Option, + ///Specify when fetching subjects in a certain state + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub review_state: core::option::Option, + ///Search subjects reviewed after a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reviewed_after: core::option::Option, + ///Search subjects reviewed before a given timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reviewed_before: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort_direction: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort_field: core::option::Option, + ///The subject to get the status for. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject: core::option::Option, + ///If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_type: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub tags: core::option::Option>, + ///Get subjects that were taken down + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takendown: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub subject_statuses: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/moderation/search_repos.rs b/crates/weaver-common/src/lexicons/tools/ozone/moderation/search_repos.rs new file mode 100644 index 0000000..5643ed2 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/moderation/search_repos.rs @@ -0,0 +1,33 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.moderation.searchRepos` namespace. +pub const NSID: &str = "tools.ozone.moderation.searchRepos"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub q: core::option::Option, + ///DEPRECATED: use 'q' instead + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub term: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub repos: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/server.rs b/crates/weaver-common/src/lexicons/tools/ozone/server.rs new file mode 100644 index 0000000..321b48f --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/server.rs @@ -0,0 +1,3 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.server` namespace. +pub mod get_config; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/server/get_config.rs b/crates/weaver-common/src/lexicons/tools/ozone/server/get_config.rs new file mode 100644 index 0000000..24df496 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/server/get_config.rs @@ -0,0 +1,43 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.server.getConfig` namespace. +pub const NSID: &str = "tools.ozone.server.getConfig"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub appview: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub blob_divert: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub chat: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub pds: core::option::Option, + ///The did of the verifier used for verification. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verifier_did: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ServiceConfigData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub url: core::option::Option, +} +pub type ServiceConfig = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ViewerConfigData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub role: core::option::Option, +} +pub type ViewerConfig = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/set.rs b/crates/weaver-common/src/lexicons/tools/ozone/set.rs new file mode 100644 index 0000000..933c363 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/set.rs @@ -0,0 +1,9 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.set` namespace. +pub mod add_values; +pub mod defs; +pub mod delete_set; +pub mod delete_values; +pub mod get_values; +pub mod query_sets; +pub mod upsert_set; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/set/add_values.rs b/crates/weaver-common/src/lexicons/tools/ozone/set/add_values.rs new file mode 100644 index 0000000..3f2c014 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/set/add_values.rs @@ -0,0 +1,20 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.set.addValues` namespace. +pub const NSID: &str = "tools.ozone.set.addValues"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Name of the set to add values to + pub name: String, + ///Array of string values to add to the set + pub values: Vec, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/set/defs.rs b/crates/weaver-common/src/lexicons/tools/ozone/set/defs.rs new file mode 100644 index 0000000..8df6c09 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/set/defs.rs @@ -0,0 +1,21 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.set.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SetData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + pub name: String, +} +pub type Set = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SetViewData { + pub created_at: atrium_api::types::string::Datetime, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + pub name: String, + pub set_size: i64, + pub updated_at: atrium_api::types::string::Datetime, +} +pub type SetView = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/set/delete_set.rs b/crates/weaver-common/src/lexicons/tools/ozone/set/delete_set.rs new file mode 100644 index 0000000..173ebed --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/set/delete_set.rs @@ -0,0 +1,33 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.set.deleteSet` namespace. +pub const NSID: &str = "tools.ozone.set.deleteSet"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Name of the set to delete + pub name: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData {} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///set with the given name does not exist + SetNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::SetNotFound(msg) => { + write!(_f, "SetNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/set/delete_values.rs b/crates/weaver-common/src/lexicons/tools/ozone/set/delete_values.rs new file mode 100644 index 0000000..4f4da58 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/set/delete_values.rs @@ -0,0 +1,31 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.set.deleteValues` namespace. +pub const NSID: &str = "tools.ozone.set.deleteValues"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Name of the set to delete values from + pub name: String, + ///Array of string values to delete from the set + pub values: Vec, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///set with the given name does not exist + SetNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::SetNotFound(msg) => { + write!(_f, "SetNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/set/get_values.rs b/crates/weaver-common/src/lexicons/tools/ozone/set/get_values.rs new file mode 100644 index 0000000..2d9d946 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/set/get_values.rs @@ -0,0 +1,41 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.set.getValues` namespace. +pub const NSID: &str = "tools.ozone.set.getValues"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + pub name: String, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub set: crate::tools::ozone::set::defs::SetView, + pub values: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///set with the given name does not exist + SetNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::SetNotFound(msg) => { + write!(_f, "SetNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/set/query_sets.rs b/crates/weaver-common/src/lexicons/tools/ozone/set/query_sets.rs new file mode 100644 index 0000000..d1b3d20 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/set/query_sets.rs @@ -0,0 +1,35 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.set.querySets` namespace. +pub const NSID: &str = "tools.ozone.set.querySets"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub name_prefix: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort_by: core::option::Option, + ///Defaults to ascending order of name field. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort_direction: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub sets: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/set/upsert_set.rs b/crates/weaver-common/src/lexicons/tools/ozone/set/upsert_set.rs new file mode 100644 index 0000000..64e92da --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/set/upsert_set.rs @@ -0,0 +1,13 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.set.upsertSet` namespace. +pub const NSID: &str = "tools.ozone.set.upsertSet"; +pub type Input = crate::tools::ozone::set::defs::Set; +pub type Output = crate::tools::ozone::set::defs::SetView; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/setting.rs b/crates/weaver-common/src/lexicons/tools/ozone/setting.rs new file mode 100644 index 0000000..33baf19 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/setting.rs @@ -0,0 +1,6 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.setting` namespace. +pub mod defs; +pub mod list_options; +pub mod remove_options; +pub mod upsert_option; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/setting/defs.rs b/crates/weaver-common/src/lexicons/tools/ozone/setting/defs.rs new file mode 100644 index 0000000..14d25d8 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/setting/defs.rs @@ -0,0 +1,21 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.setting.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OptionData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + pub created_by: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + pub did: atrium_api::types::string::Did, + pub key: atrium_api::types::string::Nsid, + pub last_updated_by: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub manager_role: core::option::Option, + pub scope: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_at: core::option::Option, + pub value: atrium_api::types::Unknown, +} +pub type Option = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/setting/list_options.rs b/crates/weaver-common/src/lexicons/tools/ozone/setting/list_options.rs new file mode 100644 index 0000000..ffea4f5 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/setting/list_options.rs @@ -0,0 +1,36 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.setting.listOptions` namespace. +pub const NSID: &str = "tools.ozone.setting.listOptions"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Filter for only the specified keys. Ignored if prefix is provided + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub keys: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Filter keys by prefix + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub prefix: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub scope: core::option::Option, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub options: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/setting/remove_options.rs b/crates/weaver-common/src/lexicons/tools/ozone/setting/remove_options.rs new file mode 100644 index 0000000..f2e7f61 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/setting/remove_options.rs @@ -0,0 +1,22 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.setting.removeOptions` namespace. +pub const NSID: &str = "tools.ozone.setting.removeOptions"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub keys: Vec, + pub scope: String, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData {} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/setting/upsert_option.rs b/crates/weaver-common/src/lexicons/tools/ozone/setting/upsert_option.rs new file mode 100644 index 0000000..9754206 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/setting/upsert_option.rs @@ -0,0 +1,29 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.setting.upsertOption` namespace. +pub const NSID: &str = "tools.ozone.setting.upsertOption"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, + pub key: atrium_api::types::string::Nsid, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub manager_role: core::option::Option, + pub scope: String, + pub value: atrium_api::types::Unknown, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub option: crate::tools::ozone::setting::defs::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/signature.rs b/crates/weaver-common/src/lexicons/tools/ozone/signature.rs new file mode 100644 index 0000000..7030a76 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/signature.rs @@ -0,0 +1,6 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.signature` namespace. +pub mod defs; +pub mod find_correlation; +pub mod find_related_accounts; +pub mod search_accounts; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/signature/defs.rs b/crates/weaver-common/src/lexicons/tools/ozone/signature/defs.rs new file mode 100644 index 0000000..8049c67 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/signature/defs.rs @@ -0,0 +1,9 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.signature.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SigDetailData { + pub property: String, + pub value: String, +} +pub type SigDetail = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/signature/find_correlation.rs b/crates/weaver-common/src/lexicons/tools/ozone/signature/find_correlation.rs new file mode 100644 index 0000000..e189c76 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/signature/find_correlation.rs @@ -0,0 +1,23 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.signature.findCorrelation` namespace. +pub const NSID: &str = "tools.ozone.signature.findCorrelation"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + pub dids: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub details: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/signature/find_related_accounts.rs b/crates/weaver-common/src/lexicons/tools/ozone/signature/find_related_accounts.rs new file mode 100644 index 0000000..a8081c4 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/signature/find_related_accounts.rs @@ -0,0 +1,39 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.signature.findRelatedAccounts` namespace. +pub const NSID: &str = "tools.ozone.signature.findRelatedAccounts"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub accounts: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RelatedAccountData { + pub account: crate::com::atproto::admin::defs::AccountView, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub similarities: core::option::Option< + Vec, + >, +} +pub type RelatedAccount = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/signature/search_accounts.rs b/crates/weaver-common/src/lexicons/tools/ozone/signature/search_accounts.rs new file mode 100644 index 0000000..d292747 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/signature/search_accounts.rs @@ -0,0 +1,29 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.signature.searchAccounts` namespace. +pub const NSID: &str = "tools.ozone.signature.searchAccounts"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + pub values: Vec, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub accounts: Vec, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/team.rs b/crates/weaver-common/src/lexicons/tools/ozone/team.rs new file mode 100644 index 0000000..a2eec69 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/team.rs @@ -0,0 +1,7 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.team` namespace. +pub mod add_member; +pub mod defs; +pub mod delete_member; +pub mod list_members; +pub mod update_member; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/team/add_member.rs b/crates/weaver-common/src/lexicons/tools/ozone/team/add_member.rs new file mode 100644 index 0000000..d08ffea --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/team/add_member.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.team.addMember` namespace. +pub const NSID: &str = "tools.ozone.team.addMember"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub did: atrium_api::types::string::Did, + pub role: String, +} +pub type Input = atrium_api::types::Object; +pub type Output = crate::tools::ozone::team::defs::Member; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///Member already exists in the team. + MemberAlreadyExists(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::MemberAlreadyExists(msg) => { + write!(_f, "MemberAlreadyExists")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/team/defs.rs b/crates/weaver-common/src/lexicons/tools/ozone/team/defs.rs new file mode 100644 index 0000000..7ec2760 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/team/defs.rs @@ -0,0 +1,29 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.team.defs` namespace. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct MemberData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub disabled: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub last_updated_by: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub profile: core::option::Option< + crate::app::bsky::actor::defs::ProfileViewDetailed, + >, + pub role: String, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_at: core::option::Option, +} +pub type Member = atrium_api::types::Object; +///Admin role. Highest level of access, can perform all actions. +pub const ROLE_ADMIN: &str = "tools.ozone.team.defs#roleAdmin"; +///Moderator role. Can perform most actions. +pub const ROLE_MODERATOR: &str = "tools.ozone.team.defs#roleModerator"; +///Triage role. Mostly intended for monitoring and escalating issues. +pub const ROLE_TRIAGE: &str = "tools.ozone.team.defs#roleTriage"; +///Verifier role. Only allowed to issue verifications. +pub const ROLE_VERIFIER: &str = "tools.ozone.team.defs#roleVerifier"; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/team/delete_member.rs b/crates/weaver-common/src/lexicons/tools/ozone/team/delete_member.rs new file mode 100644 index 0000000..7ba784d --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/team/delete_member.rs @@ -0,0 +1,36 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.team.deleteMember` namespace. +pub const NSID: &str = "tools.ozone.team.deleteMember"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub did: atrium_api::types::string::Did, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///The member being deleted does not exist + MemberNotFound(Option), + ///You can not delete yourself from the team + CannotDeleteSelf(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::MemberNotFound(msg) => { + write!(_f, "MemberNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + Error::CannotDeleteSelf(msg) => { + write!(_f, "CannotDeleteSelf")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/team/list_members.rs b/crates/weaver-common/src/lexicons/tools/ozone/team/list_members.rs new file mode 100644 index 0000000..4aad70e --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/team/list_members.rs @@ -0,0 +1,34 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.team.listMembers` namespace. +pub const NSID: &str = "tools.ozone.team.listMembers"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub disabled: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub q: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub roles: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub members: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/team/update_member.rs b/crates/weaver-common/src/lexicons/tools/ozone/team/update_member.rs new file mode 100644 index 0000000..f71a50b --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/team/update_member.rs @@ -0,0 +1,33 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.team.updateMember` namespace. +pub const NSID: &str = "tools.ozone.team.updateMember"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + pub did: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub disabled: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub role: core::option::Option, +} +pub type Input = atrium_api::types::Object; +pub type Output = crate::tools::ozone::team::defs::Member; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error { + ///The member being updated does not exist in the team + MemberNotFound(Option), +} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Error::MemberNotFound(msg) => { + write!(_f, "MemberNotFound")?; + if let Some(msg) = msg { + write!(_f, ": {msg}")?; + } + } + } + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/verification.rs b/crates/weaver-common/src/lexicons/tools/ozone/verification.rs new file mode 100644 index 0000000..bb90fee --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/verification.rs @@ -0,0 +1,6 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.verification` namespace. +pub mod defs; +pub mod grant_verifications; +pub mod list_verifications; +pub mod revoke_verifications; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/verification/defs.rs b/crates/weaver-common/src/lexicons/tools/ozone/verification/defs.rs new file mode 100644 index 0000000..9046476 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/verification/defs.rs @@ -0,0 +1,75 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.verification.defs` namespace. +///Verification data for the associated subject. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct VerificationViewData { + ///Timestamp when the verification was created. + pub created_at: atrium_api::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. + pub display_name: String, + ///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. + pub handle: atrium_api::types::string::Handle, + ///The user who issued this verification. + pub issuer: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub issuer_profile: core::option::Option< + atrium_api::types::Union, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub issuer_repo: core::option::Option< + atrium_api::types::Union, + >, + ///Describes the reason for revocation, also indicating that the verification is no longer valid. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub revoke_reason: core::option::Option, + ///Timestamp when the verification was revoked. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub revoked_at: core::option::Option, + ///The user who revoked this verification. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub revoked_by: core::option::Option, + ///The subject of the verification. + pub subject: atrium_api::types::string::Did, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_profile: core::option::Option< + atrium_api::types::Union, + >, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_repo: core::option::Option< + atrium_api::types::Union, + >, + ///The AT-URI of the verification record. + pub uri: String, +} +pub type VerificationView = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum VerificationViewIssuerProfileRefs {} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum VerificationViewIssuerRepoRefs { + #[serde(rename = "tools.ozone.moderation.defs#repoViewDetail")] + ToolsOzoneModerationDefsRepoViewDetail( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] + ToolsOzoneModerationDefsRepoViewNotFound( + Box, + ), +} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum VerificationViewSubjectProfileRefs {} +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "$type")] +pub enum VerificationViewSubjectRepoRefs { + #[serde(rename = "tools.ozone.moderation.defs#repoViewDetail")] + ToolsOzoneModerationDefsRepoViewDetail( + Box, + ), + #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] + ToolsOzoneModerationDefsRepoViewNotFound( + Box, + ), +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/verification/grant_verifications.rs b/crates/weaver-common/src/lexicons/tools/ozone/verification/grant_verifications.rs new file mode 100644 index 0000000..a628d8f --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/verification/grant_verifications.rs @@ -0,0 +1,49 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.verification.grantVerifications` namespace. +pub const NSID: &str = "tools.ozone.verification.grantVerifications"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Array of verification requests to process + pub verifications: Vec, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + pub failed_verifications: Vec, + pub verifications: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +///Error object for failed verifications. +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct GrantErrorData { + ///Error message describing the reason for failure. + pub error: String, + ///The did of the subject being verified + pub subject: atrium_api::types::string::Did, +} +pub type GrantError = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct VerificationInputData { + ///Timestamp for verification record. Defaults to current time when not specified. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, + ///Display name of the subject the verification applies to at the moment of verifying. + pub display_name: String, + ///Handle of the subject the verification applies to at the moment of verifying. + pub handle: atrium_api::types::string::Handle, + ///The did of the subject being verified + pub subject: atrium_api::types::string::Did, +} +pub type VerificationInput = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lexicons/tools/ozone/verification/list_verifications.rs b/crates/weaver-common/src/lexicons/tools/ozone/verification/list_verifications.rs new file mode 100644 index 0000000..cad3778 --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/verification/list_verifications.rs @@ -0,0 +1,48 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.verification.listVerifications` namespace. +pub const NSID: &str = "tools.ozone.verification.listVerifications"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ParametersData { + ///Filter to verifications created after this timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_after: core::option::Option, + ///Filter to verifications created before this timestamp + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_before: core::option::Option, + ///Pagination cursor + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + ///Filter to verifications that are revoked or not. By default, includes both. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub is_revoked: core::option::Option, + ///Filter to verifications from specific issuers + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub issuers: core::option::Option>, + ///Maximum number of results to return + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, + ///Sort direction for creation date + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort_direction: core::option::Option, + ///Filter to specific verified DIDs + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subjects: core::option::Option>, +} +pub type Parameters = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, + pub verifications: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} diff --git a/crates/weaver-common/src/lexicons/tools/ozone/verification/revoke_verifications.rs b/crates/weaver-common/src/lexicons/tools/ozone/verification/revoke_verifications.rs new file mode 100644 index 0000000..d1b5f4b --- /dev/null +++ b/crates/weaver-common/src/lexicons/tools/ozone/verification/revoke_verifications.rs @@ -0,0 +1,40 @@ +// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. +//!Definitions for the `tools.ozone.verification.revokeVerifications` namespace. +pub const NSID: &str = "tools.ozone.verification.revokeVerifications"; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct InputData { + ///Reason for revoking the verification. This is optional and can be omitted if not needed. + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub revoke_reason: core::option::Option, + ///Array of verification record uris to revoke + pub uris: Vec, +} +pub type Input = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + ///List of verification uris that couldn't be revoked, including failure reasons + pub failed_revocations: Vec, + ///List of verification uris successfully revoked + pub revoked_verifications: Vec, +} +pub type Output = atrium_api::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(tag = "error", content = "message")] +pub enum Error {} +impl std::fmt::Display for Error { + fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result { + Ok(()) + } +} +///Error object for failed revocations +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RevokeErrorData { + ///Description of the error that occurred during revocation. + pub error: String, + ///The AT-URI of the verification record that failed to revoke. + pub uri: String, +} +pub type RevokeError = atrium_api::types::Object; diff --git a/crates/weaver-common/src/lib.rs b/crates/weaver-common/src/lib.rs index 2f1e820..129bb62 100644 --- a/crates/weaver-common/src/lib.rs +++ b/crates/weaver-common/src/lib.rs @@ -1,11 +1,13 @@ pub use merde::CowStr; pub mod error; +pub mod lexicons; +pub use lexicons::*; pub use crate::error::{Error, IoError, ParseError, SerDeError}; /// too many cows, so we have conversions -pub fn mcow_to_cow<'a>(cow: CowStr<'a>) -> std::borrow::Cow<'a, str> { +pub fn mcow_to_cow(cow: CowStr<'_>) -> std::borrow::Cow<'_, str> { match cow { CowStr::Borrowed(s) => std::borrow::Cow::Borrowed(s), CowStr::Owned(s) => std::borrow::Cow::Owned(s.into_string()), @@ -13,7 +15,7 @@ pub fn mcow_to_cow<'a>(cow: CowStr<'a>) -> std::borrow::Cow<'a, str> { } /// too many cows, so we have conversions -pub fn cow_to_mcow<'a>(cow: std::borrow::Cow<'a, str>) -> CowStr<'a> { +pub fn cow_to_mcow(cow: std::borrow::Cow<'_, str>) -> CowStr<'_> { match cow { std::borrow::Cow::Borrowed(s) => CowStr::Borrowed(s), std::borrow::Cow::Owned(s) => CowStr::Owned(s.into()), @@ -21,7 +23,7 @@ pub fn cow_to_mcow<'a>(cow: std::borrow::Cow<'a, str>) -> CowStr<'a> { } /// too many cows, so we have conversions -pub fn mdcow_to_cow<'a>(cow: markdown_weaver::CowStr<'a>) -> std::borrow::Cow<'a, str> { +pub fn mdcow_to_cow(cow: markdown_weaver::CowStr<'_>) -> std::borrow::Cow<'_, str> { match cow { markdown_weaver::CowStr::Borrowed(s) => std::borrow::Cow::Borrowed(s), markdown_weaver::CowStr::Boxed(s) => std::borrow::Cow::Owned(s.into_string()), diff --git a/crates/weaver-workspace-hack/Cargo.toml b/crates/weaver-workspace-hack/Cargo.toml index c9894a5..a86aede 100644 --- a/crates/weaver-workspace-hack/Cargo.toml +++ b/crates/weaver-workspace-hack/Cargo.toml @@ -16,12 +16,24 @@ publish = false ### BEGIN HAKARI SECTION [dependencies] +data-encoding = { version = "2" } +futures-channel = { version = "0.3" } +futures-core = { version = "0.3" } +idna = { version = "1" } +memchr = { version = "2" } +percent-encoding = { version = "2" } +proc-macro2 = { version = "1" } +quote = { version = "1" } +scopeguard = { version = "1" } smallvec = { version = "1", default-features = false, features = ["const_new"] } +syn = { version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } tokio = { version = "1", features = ["full"] } +tracing = { version = "0.1", features = ["log"] } [build-dependencies] +data-encoding = { version = "2" } proc-macro2 = { version = "1" } quote = { version = "1" } -syn = { version = "2", features = ["extra-traits", "full", "visit-mut"] } +syn = { version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } ### END HAKARI SECTION diff --git a/deny.toml b/deny.toml index 227e873..c1c71fb 100644 --- a/deny.toml +++ b/deny.toml @@ -2,5 +2,5 @@ multiple-versions = 'allow' [licenses] -allow = ["Apache-2.0", "BSD-3-Clause", "MIT", "Unicode-3.0", "MPL-2.0", "ISC"] -private = { ignore = true } +allow = ["Apache-2.0", "BSD-3-Clause", "MIT", "Unicode-3.0", "MPL-2.0", "ISC", "Zlib",] +private = { ignore = true, ignore-sources = ["https://github.com/sugyan/atrium"] } diff --git a/flake.nix b/flake.nix index 0a7e697..15c420d 100644 --- a/flake.nix +++ b/flake.nix @@ -67,14 +67,21 @@ strictDeps = true; buildInputs = - [ + with pkgs; [ # Add additional build inputs here + sqlite + pkg-config + openssl ] ++ lib.optionals pkgs.stdenv.isDarwin [ # Additional darwin specific inputs can be set here pkgs.libiconv ]; - + nativeBuildInputs = with pkgs; [ + sqlite + pkg-config + openssl + ]; # Additional environment variables can be set directly # MY_CUSTOM_VAR = "some value"; }; @@ -183,11 +190,11 @@ inherit src; }; - "${name}-workspace-toml-fmt" = craneLib.taploFmt { - src = pkgs.lib.sources.sourceFilesBySuffices src [".toml"]; - # taplo arguments can be further customized below as needed - # taploExtraArgs = "--config ./taplo.toml"; - }; + # "${name}-workspace-toml-fmt" = craneLib.taploFmt { + # src = pkgs.lib.sources.sourceFilesBySuffices src [".toml"]; + # # taplo arguments can be further customized below as needed + # taploExtraArgs = "--config ./taplo.toml"; + # }; # Audit dependencies "${name}-workspace-audit" = craneLib.cargoAudit { diff --git a/lexicons/sh.tangled/actor.profile.json b/lexicons/sh.tangled/actor.profile.json new file mode 100644 index 0000000..b918d66 --- /dev/null +++ b/lexicons/sh.tangled/actor.profile.json @@ -0,0 +1,70 @@ +{ + "lexicon": 1, + "id": "sh.tangled.actor.profile", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a Tangled account profile.", + "key": "literal:self", + "record": { + "type": "object", + "required": ["bluesky"], + "properties": { + "description": { + "type": "string", + "description": "Free-form profile description text.", + "maxGraphemes": 256, + "maxLength": 2560 + }, + "links": { + "type": "array", + "minLength": 0, + "maxLength": 5, + "items": { + "type": "string", + "description": "Any URI, intended for social profiles or websites, can be used to link DIDs/AT-URIs too.", + "format": "uri" + } + }, + "stats": { + "type": "array", + "minLength": 0, + "maxLength": 2, + "items": { + "type": "string", + "description": "Vanity stats.", + "enum": [ + "merged-pull-request-count", + "closed-pull-request-count", + "open-pull-request-count", + "open-issue-count", + "closed-issue-count", + "repository-count" + ] + } + }, + "bluesky": { + "type": "boolean", + "description": "Include link to this account on Bluesky." + }, + "location": { + "type": "string", + "description": "Free-form location text.", + "maxGraphemes": 40, + "maxLength": 400 + }, + "pinnedRepositories": { + "type": "array", + "description": "Any ATURI, it is up to appviews to validate these fields.", + "minLength": 0, + "maxLength": 6, + "items": { + "type": "string", + "format": "at-uri" + } + } + } + } + } + } +} diff --git a/lexicons/sh.weaver.blog.post.json b/lexicons/sh.weaver.blog.post.json deleted file mode 100644 index 059a20c..0000000 --- a/lexicons/sh.weaver.blog.post.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "lexicon": 1, - "id": "sh.weaver.blog.post", - "defs": { - "main": { - "type": "record", - "description": "A blog entry", - "key": "tid", - "record": { - "type": "object", - "required": [ - "content", "title", "createdAt" - ], - "properties": { - "title": { "type": "ref", "ref": "#title" }, - "tags": { "type": "ref", "ref": "#tags" }, - - "content": { - "type": "string", - "maxLength": 200000, - "description": "The content of the blog post. This should be some flavor of Markdown." - }, - - "createdAt": { - "type": "ref", - "ref": "#createdAt" - }, - "images": { - "type": "ref", - "ref": "sh.weaver.blog.embed.images", - "description": "The set of images, if any, embedded in the blog post." - }, - } - } - }, - - "createdAt": { - "type": "string", - "format": "datetime", - "description": "The date and time when the blog post was created. This is used for sorting and displaying the post's creation date." - }, - "title": { - "type": "string", - "maxLength": 420, - "description": "The title of the blog post." - }, - "tags": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64 - }, - "maxLength": 10, - "description": "An array of tags associated with the blog post. Tags can help categorize and organize posts." - } - } -} diff --git a/lexicons/sh.weaver.embed.defs.json b/lexicons/sh.weaver.embed.defs.json deleted file mode 100644 index 8f7892b..0000000 --- a/lexicons/sh.weaver.embed.defs.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "lexicon": 1, - "id": "sh.weaver.embed.defs", - "defs": { - "percentSize": { - "type": "object", - "required": ["width", "height"], - "properties": { - "width": { "type": "integer" }, - "height": { "type": "integer" }, - }, - "description": "Proportional size of the embed relative to the viewport in larger windows. The dimensions are percentage out of 100. Could we use more granularity? Maybe, but come on." - }, - "pixelSize": { - "type": "object", - "required": ["width", "height"], - "properties": { - "width": { "type": "integer" }, - "height": { "type": "integer" }, - }, - "description": "Pixel-exact embed size. The dimensions are logical pixels, subject to scaling, so 200px at X2 scale is 400px." - }, - "record": { - - }, - "externa": { - - } - } - } diff --git a/lexicons/sh.weaver.embed.external.json b/lexicons/sh.weaver.embed.external.json deleted file mode 100644 index dbad93c..0000000 --- a/lexicons/sh.weaver.embed.external.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "lexicon": 1, - "id": "sh.weaver.embed.records", - "description": "A set of records embedded in a blog post.", - "defs": { - "main": { - "type": "object", - "required": ["records"], - "properties": { - "images": { - "type": "array", - "items": { "type": "ref", "ref": "#sh.weaver.embed.defs#external" }, - "maxLength": 48 - } - } - }, - - } - } diff --git a/lexicons/sh.weaver.embed.images.json b/lexicons/sh.weaver.embed.images.json deleted file mode 100644 index 662ff16..0000000 --- a/lexicons/sh.weaver.embed.images.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "lexicon": 1, - "id": "sh.weaver.embed.images", - "description": "A set of images embedded in a blog post.", - "defs": { - "main": { - "type": "object", - "required": ["images"], - "properties": { - "images": { - "type": "array", - "items": { "type": "ref", "ref": "#image" }, - "maxLength": 48 - } - } - }, - "image": { - "type": "object", - "required": ["image"], - "properties": { - "image": { - "type": "blob", - "accept": ["image/*"], - "maxSize": 3000000 - }, - "alt": { - "type": "string", - "description": "alt text description of the image" - }, - "blurhash": { - "type": "string", - "maxLength": 32, - "description": "Blurhash string for the image, used for low-resolution placeholders. This must be a valid Blurhash string." - }, - "dimensions": { - "type": "union", - "refs": [ - "app.bsky.embed.defs#aspectRatio", - "sh.weaver.embed.defs#percentSize", - "sh.weaver.embed.defs#pixelSize" - ] - } - } - }, - } - } diff --git a/lexicons/sh.weaver.embed.record.json b/lexicons/sh.weaver.embed.record.json deleted file mode 100644 index 982656e..0000000 --- a/lexicons/sh.weaver.embed.record.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "lexicon": 1, - "id": "computer.nonbinary.embed.records", - "description": "A set of records embedded in a blog post.", - "defs": { - "main": { - "type": "object", - "required": ["records"], - "properties": { - "images": { - "type": "array", - "items": { "type": "ref", "ref": "#computer.nonbinary.embed.defs#record" }, - "maxLength": 48 - } - } - }, - - } - } diff --git a/lexicons/sh.weaver/actor/defs.json b/lexicons/sh.weaver/actor/defs.json new file mode 100644 index 0000000..2c6b343 --- /dev/null +++ b/lexicons/sh.weaver/actor/defs.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "sh.weaver.actor.defs", + "defs": { + "profileView": { + "type": "object", + "required": ["did", "handle"], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { "type": "string", "format": "handle" }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640 + }, + "description": { + "type": "string", + "maxGraphemes": 256, + "maxLength": 2560 + }, + "avatar": { "type": "string", "format": "uri" }, + + "indexedAt": { "type": "string", "format": "datetime" }, + "createdAt": { "type": "string", "format": "datetime" }, + + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + + "status": { + "type": "ref", + "ref": "#statusView" + } + } + } + } +} diff --git a/lexicons/sh.weaver/actor/profile.json b/lexicons/sh.weaver/actor/profile.json new file mode 100644 index 0000000..cfe1004 --- /dev/null +++ b/lexicons/sh.weaver/actor/profile.json @@ -0,0 +1,74 @@ +{ + "lexicon": 1, + "id": "sh.weaver.actor.profile", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a Weaver account profile.", + "key": "literal:self", + "record": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640 + }, + "description": { + "type": "string", + "description": "Free-form profile description text.", + "maxGraphemes": 256, + "maxLength": 2560 + }, + "avatar": { + "type": "blob", + "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'", + "accept": ["image/png", "image/jpeg"], + "maxSize": 1000000 + }, + "links": { + "type": "array", + "minLength": 0, + "maxLength": 5, + "items": { + "type": "string", + "description": "Any URI, intended for social profiles or websites, can be used to link DIDs/AT-URIs too.", + "format": "uri" + } + }, + "pronouns": { + "type": "ref", + "description": "Pronouns to use in user-generated content.", + "ref": "#pronounsList" + }, + "pinnedPost": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "bluesky": { + "type": "boolean", + "description": "Include link to this account on Bluesky." + }, + "tangled": { + "type": "boolean", + "description": "Include link to this account on Tangled." + }, + "location": { + "type": "string", + "description": "Free-form location text.", + "maxGraphemes": 40, + "maxLength": 400 + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + }, + "pronounsList": { + "type": "array", + "items": { + "type": "string", + "enum": ["she/her", "he/him", "they/them", "it/its", "she/they", "he/they", "they/he", "they/she"] + } + } + } +} diff --git a/lexicons/sh.weaver/embed/defs.json b/lexicons/sh.weaver/embed/defs.json new file mode 100644 index 0000000..1a5fd15 --- /dev/null +++ b/lexicons/sh.weaver/embed/defs.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "sh.weaver.embed.defs", + "defs": { + "percentSize": { + "type": "object", + "required": ["width", "height"], + "properties": { + "width": { "type": "integer" }, + "height": { "type": "integer" } + }, + "description": "Proportional size of the embed relative to the viewport in larger windows. The dimensions are percentage out of 100. Could we use more granularity? Maybe, but come on." + }, + "pixelSize": { + "type": "object", + "required": ["width", "height"], + "properties": { + "width": { "type": "integer" }, + "height": { "type": "integer" } + }, + "description": "Pixel-exact embed size. The dimensions are logical pixels, subject to scaling, so 200px at X2 scale is 400px." + } + } +} diff --git a/lexicons/sh.weaver/embed/external.json b/lexicons/sh.weaver/embed/external.json new file mode 100644 index 0000000..504f16b --- /dev/null +++ b/lexicons/sh.weaver/embed/external.json @@ -0,0 +1,52 @@ +{ + "lexicon": 1, + "id": "sh.weaver.embed.records", + "description": "A set of records embedded in a blog post.", + "defs": { + "main": { + "type": "object", + "required": ["records"], + "properties": { + "records": { + "type": "array", + "items": { "type": "ref", "ref": "#external" }, + "maxLength": 48 + } + } + }, + "external": { + "type": "object", + "required": ["uri", "title", "description"], + "properties": { + "uri": { "type": "string", "format": "uri" }, + "title": { "type": "string" }, + "description": { "type": "string" }, + "thumb": { + "type": "blob", + "accept": ["image/*"], + "maxSize": 1000000 + } + } + }, + "view": { + "type": "object", + "required": ["external"], + "properties": { + "external": { + "type": "ref", + "ref": "#viewExternal" + } + } + }, + "viewExternal": { + "type": "object", + "required": ["uri", "title", "description"], + "properties": { + "uri": { "type": "string", "format": "uri" }, + "title": { "type": "string" }, + "description": { "type": "string" }, + "thumb": { "type": "string", "format": "uri" } + } + } + } +} diff --git a/lexicons/sh.weaver/embed/images.json b/lexicons/sh.weaver/embed/images.json new file mode 100644 index 0000000..5f04d3c --- /dev/null +++ b/lexicons/sh.weaver/embed/images.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "sh.weaver.embed.images", + "description": "A set of images embedded in a blog post.", + "defs": { + "main": { + "type": "object", + "required": ["images"], + "properties": { + "images": { + "type": "array", + "items": { "type": "ref", "ref": "#image" }, + "maxLength": 48 + } + } + }, + "image": { + "type": "object", + "required": ["image", "alt"], + "properties": { + "image": { + "type": "blob", + "accept": ["image/*"], + "maxSize": 3000000 + }, + "alt": { + "type": "string", + "description": "alt text description of the image" + }, + "blurhash": { + "type": "string", + "maxLength": 32, + "description": "Blurhash string for the image, used for low-resolution placeholders. This must be a valid Blurhash string." + }, + "dimensions": { + "type": "union", + "refs": ["app.bsky.embed.defs#aspectRatio", "sh.weaver.embed.defs#percentSize", "sh.weaver.embed.defs#pixelSize"] + } + } + } + } +} diff --git a/lexicons/sh.weaver/embed/recordWithMedia.json b/lexicons/sh.weaver/embed/recordWithMedia.json new file mode 100644 index 0000000..2dbf128 --- /dev/null +++ b/lexicons/sh.weaver/embed/recordWithMedia.json @@ -0,0 +1,41 @@ +{ + "lexicon": 1, + "id": "sh.weaver.embed.recordWithMedia", + "description": "A representation of a record embedded in a Weaver record (eg, a notebook entry), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.", + "defs": { + "main": { + "type": "object", + "required": ["record", "media"], + "properties": { + "record": { + "type": "union", + "refs": ["app.bsky.embed.record", "sh.weaver.embed.record"] + }, + "media": { + "type": "union", + "refs": ["sh.weaver.embed.images", "sh.weaver.embed.external", "app.bsky.embed.images", "app.bsky.embed.video", "app.bsky.embed.external"] + } + } + }, + "view": { + "type": "object", + "required": ["record", "media"], + "properties": { + "record": { + "type": "union", + "refs": ["sh.weaver.embed.record#view", "app.bsky.embed.record#view"] + }, + "media": { + "type": "union", + "refs": [ + "sh.weaver.embed.images#view", + "sh.weaver.embed.external#view", + "app.bsky.embed.images#view", + "app.bsky.embed.video#view", + "app.bsky.embed.external#view" + ] + } + } + } + } +} diff --git a/lexicons/sh.weaver/embed/records.json b/lexicons/sh.weaver/embed/records.json new file mode 100644 index 0000000..c26e438 --- /dev/null +++ b/lexicons/sh.weaver/embed/records.json @@ -0,0 +1,101 @@ +{ + "lexicon": 1, + "id": "sh.weaver.embed.records", + "description": "A set of records embedded in a blog post.", + "defs": { + "main": { + "type": "object", + "required": ["records"], + "properties": { + "records": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, + "maxLength": 48 + } + } + }, + "view": { + "type": "object", + "required": ["record"], + "properties": { + "record": { + "type": "union", + "refs": [ + "#viewRecord", + "#viewNotFound", + "#viewBlocked", + "#viewDetached", + "app.bsky.feed.defs#generatorView", + "app.bsky.graph.defs#listView", + "app.bsky.labeler.defs#labelerView", + "app.bsky.graph.defs#starterPackViewBasic" + ] + } + } + }, + "viewRecord": { + "type": "object", + "required": ["uri", "cid", "author", "value", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "author": { + "type": "union", + "refs": ["app.bsky.actor.defs#profileViewBasic"] + }, + "value": { + "type": "unknown", + "description": "The record data itself." + }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "replyCount": { "type": "integer" }, + "repostCount": { "type": "integer" }, + "likeCount": { "type": "integer" }, + "quoteCount": { "type": "integer" }, + "embeds": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "app.bsky.embed.images#view", + "app.bsky.embed.video#view", + "app.bsky.embed.external#view", + "app.bsky.embed.record#view", + "app.bsky.embed.recordWithMedia#view", + "sh.weaver.embed.records#view" + ] + } + }, + "indexedAt": { "type": "string", "format": "datetime" } + } + }, + "viewNotFound": { + "type": "object", + "required": ["uri", "notFound"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "notFound": { "type": "boolean", "const": true } + } + }, + "viewBlocked": { + "type": "object", + "required": ["uri", "blocked", "author"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "blocked": { "type": "boolean", "const": true }, + "author": { "type": "ref", "ref": "app.bsky.feed.defs#blockedAuthor" } + } + }, + "viewDetached": { + "type": "object", + "required": ["uri", "detached"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "detached": { "type": "boolean", "const": true } + } + } + } +} diff --git a/lexicons/sh.weaver/embed/video.json b/lexicons/sh.weaver/embed/video.json new file mode 100644 index 0000000..f31ce52 --- /dev/null +++ b/lexicons/sh.weaver/embed/video.json @@ -0,0 +1,67 @@ +{ + "lexicon": 1, + "id": "sh.weaver.embed.video", + "description": "A video embedded in a Weaver record (eg, a notebook entry).", + "defs": { + "main": { + "type": "object", + "required": ["video"], + "properties": { + "video": { + "type": "blob", + "description": "The mp4 video file. May be up to 100mb, formerly limited to 50mb.", + "accept": ["video/mp4"], + "maxSize": 100000000 + }, + "captions": { + "type": "array", + "items": { "type": "ref", "ref": "#caption" }, + "maxLength": 20 + }, + "alt": { + "type": "string", + "description": "Alt text description of the video, for accessibility.", + "maxGraphemes": 1000, + "maxLength": 10000 + }, + "aspectRatio": { + "type": "ref", + "ref": "app.bsky.embed.defs#aspectRatio" + } + } + }, + "caption": { + "type": "object", + "required": ["lang", "file"], + "properties": { + "lang": { + "type": "string", + "format": "language" + }, + "file": { + "type": "blob", + "accept": ["text/vtt"], + "maxSize": 20000 + } + } + }, + "view": { + "type": "object", + "required": ["cid", "playlist"], + "properties": { + "cid": { "type": "string", "format": "cid" }, + "playlist": { "type": "string", "format": "uri" }, + "thumbnail": { "type": "string", "format": "uri" }, + "alt": { + "type": "string", + "maxGraphemes": 1000, + "maxLength": 10000 + }, + "aspectRatio": { + "type": "ref", + "ref": "app.bsky.embed.defs#aspectRatio" + } + } + } + } +} diff --git a/lexicons/sh.weaver/notebook/authors.json b/lexicons/sh.weaver/notebook/authors.json new file mode 100644 index 0000000..7748569 --- /dev/null +++ b/lexicons/sh.weaver/notebook/authors.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "sh.weaver.notebook.authors", + "defs": { + "main": { + "type": "record", + "description": "Authors of a Weaver notebook.", + "key": "literal:self", + "record": { + "type": "object", + "required": ["authorList"], + "properties": { + "authorList": { + "type": "array", + "items": { + "type": "ref", + "ref": "#authorListItem" + } + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + }, + "authorListItem": { + "type": "object", + "description": "A single author in a Weaver notebook.", + "required": ["profile, index"], + "properties": { + "profile": { + "type": "union", + "refs": ["app.bsky.actor.defs#profileViewBasic", "sh.weaver.actor.profile", "sh.tangled.actor.defs#profileView"] + }, + "index": { "type": "integer" } + } + } + } +} diff --git a/lexicons/sh.weaver.blog.defs.json b/lexicons/sh.weaver/notebook/defs.json similarity index 70% rename from lexicons/sh.weaver.blog.defs.json rename to lexicons/sh.weaver/notebook/defs.json index d094045..34bb9b5 100644 --- a/lexicons/sh.weaver.blog.defs.json +++ b/lexicons/sh.weaver/notebook/defs.json @@ -1,20 +1,20 @@ { "lexicon": 1, - "id": "sh.weaver.blog.defs", + "id": "sh.weaver.notebook.defs", "defs": { - "postView" :{ + "entryView": { "type": "object", "required": ["uri", "cid", "author", "record", "indexedAt"], "authors": { "type": "array", "items": { "type": "union", - "refs": ["app.bsky.actor.defs#profileViewBasic" ] // add own lexicon for this + "refs": ["app.bsky.actor.defs#profileViewBasic"] } }, "properties": { "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, + "cid": { "type": "string", "format": "cid" } }, "record": { "type": "unknown" }, @@ -22,7 +22,7 @@ "type": "ref", "ref": "#renderedView" }, - "indexedAt": { "type": "string", "format": "datetime" }, + "indexedAt": { "type": "string", "format": "datetime" } }, "renderedView": { @@ -38,9 +38,9 @@ "type": "blob", "accept": ["text/css"], "maxSize": 1000000 - }, + } }, - "description": "View of a rendered and cached blog post" - }, + "description": "View of a rendered and cached notebook entry" + } } } diff --git a/lexicons/sh.weaver/notebook/entry.json b/lexicons/sh.weaver/notebook/entry.json new file mode 100644 index 0000000..7a3b1e6 --- /dev/null +++ b/lexicons/sh.weaver/notebook/entry.json @@ -0,0 +1,55 @@ +{ + "lexicon": 1, + "id": "sh.weaver.notebook.entry", + "defs": { + "main": { + "type": "record", + "description": "A notebook entry", + "key": "tid", + "record": { + "type": "object", + "required": ["content", "title", "createdAt"], + "properties": { + "title": { "type": "ref", "ref": "#title" }, + "tags": { "type": "ref", "ref": "#tags" }, + + "content": { + "type": "string", + "maxLength": 200000, + "description": "The content of the notebook entry. This should be some flavor of Markdown." + }, + + "createdAt": { + "type": "ref", + "ref": "#createdAt" + }, + "images": { + "type": "ref", + "ref": "sh.weaver.embed.images", + "description": "The set of images, if any, embedded in the notebook entry." + } + } + } + }, + + "createdAt": { + "type": "string", + "format": "datetime", + "description": "The date and time when the notebook entry was created. This is used for sorting and displaying the entry's creation date." + }, + "title": { + "type": "string", + "maxLength": 420, + "description": "The title of the notebook entry." + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 64 + }, + "maxLength": 10, + "description": "An array of tags associated with the notebook entry. Tags can help categorize and organize entries." + } + } +} diff --git a/tangled/core b/tangled/core new file mode 160000 index 0000000..c1b5f8a --- /dev/null +++ b/tangled/core @@ -0,0 +1 @@ +Subproject commit c1b5f8af08545deb46da789c376be2309fa40355