From a9acc6fedfffa4f3db56e381b170a120f16de430 Mon Sep 17 00:00:00 2001 From: sugyan Date: Tue, 19 Nov 2024 10:05:00 +0900 Subject: [PATCH 1/2] Update API, based on the latest lexicon schemas --- atrium-api/src/app/bsky/graph.rs | 1 + .../app/bsky/graph/search_starter_packs.rs | 30 +++ atrium-api/src/app/bsky/unspecced.rs | 2 + atrium-api/src/app/bsky/unspecced/defs.rs | 6 + .../src/app/bsky/unspecced/get_config.rs | 18 ++ .../search_starter_packs_skeleton.rs | 47 ++++ atrium-api/src/chat/bsky/convo/defs.rs | 2 + atrium-api/src/client.rs | 204 ++++++++++++++++++ atrium-api/src/com/atproto/admin/defs.rs | 9 + atrium-api/src/tools/ozone.rs | 1 + atrium-api/src/tools/ozone/moderation/defs.rs | 103 ++++++++- .../src/tools/ozone/moderation/emit_event.rs | 12 ++ .../tools/ozone/moderation/query_events.rs | 8 +- .../tools/ozone/moderation/query_statuses.rs | 23 +- atrium-api/src/tools/ozone/setting.rs | 6 + atrium-api/src/tools/ozone/setting/defs.rs | 21 ++ .../src/tools/ozone/setting/list_options.rs | 36 ++++ .../src/tools/ozone/setting/remove_options.rs | 22 ++ .../src/tools/ozone/setting/upsert_option.rs | 29 +++ 19 files changed, 576 insertions(+), 4 deletions(-) create mode 100644 atrium-api/src/app/bsky/graph/search_starter_packs.rs create mode 100644 atrium-api/src/app/bsky/unspecced/get_config.rs create mode 100644 atrium-api/src/app/bsky/unspecced/search_starter_packs_skeleton.rs create mode 100644 atrium-api/src/tools/ozone/setting.rs create mode 100644 atrium-api/src/tools/ozone/setting/defs.rs create mode 100644 atrium-api/src/tools/ozone/setting/list_options.rs create mode 100644 atrium-api/src/tools/ozone/setting/remove_options.rs create mode 100644 atrium-api/src/tools/ozone/setting/upsert_option.rs diff --git a/atrium-api/src/app/bsky/graph.rs b/atrium-api/src/app/bsky/graph.rs index a4e7ee2b..e859bab5 100644 --- a/atrium-api/src/app/bsky/graph.rs +++ b/atrium-api/src/app/bsky/graph.rs @@ -23,6 +23,7 @@ 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; diff --git a/atrium-api/src/app/bsky/graph/search_starter_packs.rs b/atrium-api/src/app/bsky/graph/search_starter_packs.rs new file mode 100644 index 00000000..ede1e4bc --- /dev/null +++ b/atrium-api/src/app/bsky/graph/search_starter_packs.rs @@ -0,0 +1,30 @@ +// @generated - This file is generated by 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 = "Option::is_none")] + pub cursor: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub limit: Option>, + ///Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. + pub q: String, +} +pub type Parameters = crate::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "Option::is_none")] + pub cursor: Option, + pub starter_packs: Vec, +} +pub type Output = crate::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/atrium-api/src/app/bsky/unspecced.rs b/atrium-api/src/app/bsky/unspecced.rs index a3da9d71..ea7d9dbc 100644 --- a/atrium-api/src/app/bsky/unspecced.rs +++ b/atrium-api/src/app/bsky/unspecced.rs @@ -1,8 +1,10 @@ // @generated - This file is generated by 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_suggestions_skeleton; pub mod get_tagged_suggestions; pub mod search_actors_skeleton; pub mod search_posts_skeleton; +pub mod search_starter_packs_skeleton; diff --git a/atrium-api/src/app/bsky/unspecced/defs.rs b/atrium-api/src/app/bsky/unspecced/defs.rs index ae48eefc..5b8a47c3 100644 --- a/atrium-api/src/app/bsky/unspecced/defs.rs +++ b/atrium-api/src/app/bsky/unspecced/defs.rs @@ -12,3 +12,9 @@ pub struct SkeletonSearchPostData { pub uri: String, } pub type SkeletonSearchPost = crate::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SkeletonSearchStarterPackData { + pub uri: String, +} +pub type SkeletonSearchStarterPack = crate::types::Object; diff --git a/atrium-api/src/app/bsky/unspecced/get_config.rs b/atrium-api/src/app/bsky/unspecced/get_config.rs new file mode 100644 index 00000000..42d68bd2 --- /dev/null +++ b/atrium-api/src/app/bsky/unspecced/get_config.rs @@ -0,0 +1,18 @@ +// @generated - This file is generated by 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 = "Option::is_none")] + pub check_email_confirmed: Option, +} +pub type Output = crate::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/atrium-api/src/app/bsky/unspecced/search_starter_packs_skeleton.rs b/atrium-api/src/app/bsky/unspecced/search_starter_packs_skeleton.rs new file mode 100644 index 00000000..8e1d91d8 --- /dev/null +++ b/atrium-api/src/app/bsky/unspecced/search_starter_packs_skeleton.rs @@ -0,0 +1,47 @@ +// @generated - This file is generated by 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 = "Option::is_none")] + pub cursor: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub limit: 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 = "Option::is_none")] + pub viewer: Option, +} +pub type Parameters = crate::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "Option::is_none")] + pub cursor: Option, + ///Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. + #[serde(skip_serializing_if = "Option::is_none")] + pub hits_total: Option, + pub starter_packs: Vec, +} +pub type Output = crate::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/atrium-api/src/chat/bsky/convo/defs.rs b/atrium-api/src/chat/bsky/convo/defs.rs index f46416b4..d7735ecd 100644 --- a/atrium-api/src/chat/bsky/convo/defs.rs +++ b/atrium-api/src/chat/bsky/convo/defs.rs @@ -8,6 +8,8 @@ pub struct ConvoViewData { pub last_message: Option>, pub members: Vec, pub muted: bool, + #[serde(skip_serializing_if = "Option::is_none")] + pub opened: Option, pub rev: String, pub unread_count: i64, } diff --git a/atrium-api/src/client.rs b/atrium-api/src/client.rs index 633077b2..a865bef2 100644 --- a/atrium-api/src/client.rs +++ b/atrium-api/src/client.rs @@ -287,6 +287,7 @@ pub mod tools { 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(crate) _phantom: core::marker::PhantomData, @@ -327,6 +328,15 @@ pub mod tools { 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 @@ -1682,6 +1692,36 @@ where _ => 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, @@ -1977,6 +2017,35 @@ where _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, @@ -2132,6 +2201,37 @@ where _ => 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), + } + } } #[cfg(feature = "namespace-appbsky")] impl app::bsky::video::Service @@ -5065,6 +5165,7 @@ where ), 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), ), @@ -5722,6 +5823,109 @@ where } } #[cfg(feature = "namespace-toolsozone")] +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), + } + } +} +#[cfg(feature = "namespace-toolsozone")] impl tools::ozone::signature::Service where T: atrium_xrpc::XrpcClient + Send + Sync, diff --git a/atrium-api/src/com/atproto/admin/defs.rs b/atrium-api/src/com/atproto/admin/defs.rs index e93270e2..2a8649af 100644 --- a/atrium-api/src/com/atproto/admin/defs.rs +++ b/atrium-api/src/com/atproto/admin/defs.rs @@ -22,6 +22,8 @@ pub struct AccountViewData { pub invites_disabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub related_records: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub threat_signatures: Option>, } pub type AccountView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -47,3 +49,10 @@ pub struct StatusAttrData { pub r#ref: Option, } pub type StatusAttr = crate::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 = crate::types::Object; diff --git a/atrium-api/src/tools/ozone.rs b/atrium-api/src/tools/ozone.rs index 9d865da8..6298390b 100644 --- a/atrium-api/src/tools/ozone.rs +++ b/atrium-api/src/tools/ozone.rs @@ -4,5 +4,6 @@ pub mod communication; pub mod moderation; pub mod server; pub mod set; +pub mod setting; pub mod signature; pub mod team; diff --git a/atrium-api/src/tools/ozone/moderation/defs.rs b/atrium-api/src/tools/ozone/moderation/defs.rs index e286c32e..15527c26 100644 --- a/atrium-api/src/tools/ozone/moderation/defs.rs +++ b/atrium-api/src/tools/ozone/moderation/defs.rs @@ -1,5 +1,34 @@ // @generated - This file is generated by 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 = "Option::is_none")] + pub comment: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub status: Option, + pub timestamp: crate::types::string::Datetime, +} +pub type AccountEvent = crate::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AccountHostingData { + #[serde(skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub deactivated_at: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub deleted_at: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub reactivated_at: Option, + pub status: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} +pub type AccountHosting = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct BlobViewData { @@ -13,6 +42,21 @@ pub struct BlobViewData { pub size: i64, } pub type BlobView = crate::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 = "Option::is_none")] + pub comment: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub handle: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub pds_host: Option, + pub timestamp: crate::types::string::Datetime, + #[serde(skip_serializing_if = "Option::is_none")] + pub tombstone: Option, +} +pub type IdentityEvent = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ImageDetailsData { @@ -92,8 +136,9 @@ pub type ModEventMute = crate::types::Object; pub struct ModEventMuteReporterData { #[serde(skip_serializing_if = "Option::is_none")] pub comment: Option, - ///Indicates how long the account should remain muted. - pub duration_in_hours: i64, + ///Indicates how long the account should remain muted. Falsy value here means a permanent mute. + #[serde(skip_serializing_if = "Option::is_none")] + pub duration_in_hours: Option, } pub type ModEventMuteReporter = crate::types::Object; ///Report a subject @@ -211,6 +256,30 @@ pub struct ModerationDetailData { pub subject_status: Option, } pub type ModerationDetail = crate::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 = "Option::is_none")] + pub cid: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub comment: Option, + pub op: String, + pub timestamp: crate::types::string::Datetime, +} +pub type RecordEvent = crate::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct RecordHostingData { + #[serde(skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub deleted_at: Option, + pub status: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} +pub type RecordHosting = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RecordViewData { @@ -261,6 +330,10 @@ pub struct RepoViewData { pub invites_disabled: Option, pub moderation: Moderation, pub related_records: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + pub threat_signatures: Option< + Vec, + >, } pub type RepoView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -287,6 +360,10 @@ pub struct RepoViewDetailData { pub labels: Option>, pub moderation: ModerationDetail, pub related_records: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + pub threat_signatures: Option< + Vec, + >, } pub type RepoViewDetail = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -315,6 +392,8 @@ pub struct SubjectStatusViewData { pub comment: Option, ///Timestamp referencing the first moderation status impacting event was emitted on the subject pub created_at: crate::types::string::Datetime, + #[serde(skip_serializing_if = "Option::is_none")] + pub hosting: Option>, pub id: i64, ///Timestamp referencing when the author of the subject appealed a moderation action #[serde(skip_serializing_if = "Option::is_none")] @@ -394,6 +473,12 @@ pub enum ModEventViewDetailEventRefs { 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), } #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -440,6 +525,12 @@ pub enum ModEventViewEventRefs { 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), } #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] @@ -453,6 +544,14 @@ pub enum ModEventViewSubjectRefs { } #[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), diff --git a/atrium-api/src/tools/ozone/moderation/emit_event.rs b/atrium-api/src/tools/ozone/moderation/emit_event.rs index 82fc95d3..3987e0d2 100644 --- a/atrium-api/src/tools/ozone/moderation/emit_event.rs +++ b/atrium-api/src/tools/ozone/moderation/emit_event.rs @@ -89,6 +89,18 @@ pub enum InputEventRefs { 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, + ), } #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "$type")] diff --git a/atrium-api/src/tools/ozone/moderation/query_events.rs b/atrium-api/src/tools/ozone/moderation/query_events.rs index bbb691f4..9f58e398 100644 --- a/atrium-api/src/tools/ozone/moderation/query_events.rs +++ b/atrium-api/src/tools/ozone/moderation/query_events.rs @@ -10,6 +10,9 @@ pub struct ParametersData { ///If specified, only events where all of these tags were added are returned #[serde(skip_serializing_if = "Option::is_none")] pub added_tags: 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 = "Option::is_none")] + pub collections: Option>, ///If specified, only events with comments containing the keyword are returned #[serde(skip_serializing_if = "Option::is_none")] pub comment: Option, @@ -26,7 +29,7 @@ pub struct ParametersData { ///If true, only events with comments are returned #[serde(skip_serializing_if = "Option::is_none")] pub has_comment: Option, - ///If true, events on all record types (posts, lists, profile etc.) owned by the did are returned + ///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 = "Option::is_none")] pub include_all_user_records: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -44,6 +47,9 @@ pub struct ParametersData { pub sort_direction: Option, #[serde(skip_serializing_if = "Option::is_none")] pub subject: 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 = "Option::is_none")] + pub subject_type: 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 = "Option::is_none")] pub types: Option>, diff --git a/atrium-api/src/tools/ozone/moderation/query_statuses.rs b/atrium-api/src/tools/ozone/moderation/query_statuses.rs index 6bd10a50..aa3fe3cb 100644 --- a/atrium-api/src/tools/ozone/moderation/query_statuses.rs +++ b/atrium-api/src/tools/ozone/moderation/query_statuses.rs @@ -7,6 +7,9 @@ pub struct ParametersData { ///Get subjects in unresolved appealed status #[serde(skip_serializing_if = "Option::is_none")] pub appealed: 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 = "Option::is_none")] + pub collections: Option>, ///Search subjects by keyword from comments #[serde(skip_serializing_if = "Option::is_none")] pub comment: Option, @@ -14,9 +17,24 @@ pub struct ParametersData { pub cursor: Option, #[serde(skip_serializing_if = "Option::is_none")] pub exclude_tags: Option>, + ///Search subjects where the associated record/account was deleted after a given timestamp + #[serde(skip_serializing_if = "Option::is_none")] + pub hosting_deleted_after: Option, + ///Search subjects where the associated record/account was deleted before a given timestamp + #[serde(skip_serializing_if = "Option::is_none")] + pub hosting_deleted_before: Option, + ///Search subjects by the status of the associated record/account + #[serde(skip_serializing_if = "Option::is_none")] + pub hosting_statuses: Option>, + ///Search subjects where the associated record/account was updated after a given timestamp + #[serde(skip_serializing_if = "Option::is_none")] + pub hosting_updated_after: Option, + ///Search subjects where the associated record/account was updated before a given timestamp + #[serde(skip_serializing_if = "Option::is_none")] + pub hosting_updated_before: Option, #[serde(skip_serializing_if = "Option::is_none")] pub ignore_subjects: Option>, - ///All subjects belonging to the account specified in the 'subject' param will be returned. + ///All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. #[serde(skip_serializing_if = "Option::is_none")] pub include_all_user_records: Option, ///By default, we don't include muted subjects in the results. Set this to true to include them. @@ -52,6 +70,9 @@ pub struct ParametersData { ///The subject to get the status for. #[serde(skip_serializing_if = "Option::is_none")] pub subject: 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 = "Option::is_none")] + pub subject_type: Option, #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option>, ///Get subjects that were taken down diff --git a/atrium-api/src/tools/ozone/setting.rs b/atrium-api/src/tools/ozone/setting.rs new file mode 100644 index 00000000..2f17aa5f --- /dev/null +++ b/atrium-api/src/tools/ozone/setting.rs @@ -0,0 +1,6 @@ +// @generated - This file is generated by 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/atrium-api/src/tools/ozone/setting/defs.rs b/atrium-api/src/tools/ozone/setting/defs.rs new file mode 100644 index 00000000..7d8d55d8 --- /dev/null +++ b/atrium-api/src/tools/ozone/setting/defs.rs @@ -0,0 +1,21 @@ +// @generated - This file is generated by 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 = "Option::is_none")] + pub created_at: Option, + pub created_by: crate::types::string::Did, + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + pub did: crate::types::string::Did, + pub key: crate::types::string::Nsid, + pub last_updated_by: crate::types::string::Did, + #[serde(skip_serializing_if = "Option::is_none")] + pub manager_role: Option, + pub scope: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub updated_at: Option, + pub value: crate::types::Unknown, +} +pub type Option = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/setting/list_options.rs b/atrium-api/src/tools/ozone/setting/list_options.rs new file mode 100644 index 00000000..2d849543 --- /dev/null +++ b/atrium-api/src/tools/ozone/setting/list_options.rs @@ -0,0 +1,36 @@ +// @generated - This file is generated by 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 = "Option::is_none")] + pub cursor: Option, + ///Filter for only the specified keys. Ignored if prefix is provided + #[serde(skip_serializing_if = "Option::is_none")] + pub keys: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub limit: Option>, + ///Filter keys by prefix + #[serde(skip_serializing_if = "Option::is_none")] + pub prefix: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub scope: Option, +} +pub type Parameters = crate::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData { + #[serde(skip_serializing_if = "Option::is_none")] + pub cursor: Option, + pub options: Vec, +} +pub type Output = crate::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/atrium-api/src/tools/ozone/setting/remove_options.rs b/atrium-api/src/tools/ozone/setting/remove_options.rs new file mode 100644 index 00000000..580af16a --- /dev/null +++ b/atrium-api/src/tools/ozone/setting/remove_options.rs @@ -0,0 +1,22 @@ +// @generated - This file is generated by 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 = crate::types::Object; +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct OutputData {} +pub type Output = crate::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/atrium-api/src/tools/ozone/setting/upsert_option.rs b/atrium-api/src/tools/ozone/setting/upsert_option.rs new file mode 100644 index 00000000..dfc4049a --- /dev/null +++ b/atrium-api/src/tools/ozone/setting/upsert_option.rs @@ -0,0 +1,29 @@ +// @generated - This file is generated by 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 = "Option::is_none")] + pub description: Option, + pub key: crate::types::string::Nsid, + #[serde(skip_serializing_if = "Option::is_none")] + pub manager_role: Option, + pub scope: String, + pub value: crate::types::Unknown, +} +pub type Input = crate::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 = crate::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(()) + } +} From 9c20454c0d80a9a8b89eef7cf4e2b8852674676c Mon Sep 17 00:00:00 2001 From: sugyan Date: Tue, 19 Nov 2024 11:07:28 +0900 Subject: [PATCH 2/2] Update codegen, replace `Option` to `core::option::Option` --- atrium-api/src/app/bsky/actor/defs.rs | 240 ++++++++------- .../src/app/bsky/actor/get_suggestions.rs | 12 +- atrium-api/src/app/bsky/actor/profile.rs | 34 +- .../src/app/bsky/actor/search_actors.rs | 20 +- .../app/bsky/actor/search_actors_typeahead.rs | 12 +- atrium-api/src/app/bsky/embed/external.rs | 8 +- atrium-api/src/app/bsky/embed/images.rs | 8 +- atrium-api/src/app/bsky/embed/record.rs | 24 +- atrium-api/src/app/bsky/embed/video.rs | 24 +- atrium-api/src/app/bsky/feed/defs.rs | 158 +++++----- .../app/bsky/feed/describe_feed_generator.rs | 12 +- atrium-api/src/app/bsky/feed/generator.rs | 22 +- .../src/app/bsky/feed/get_actor_feeds.rs | 12 +- .../src/app/bsky/feed/get_actor_likes.rs | 12 +- .../src/app/bsky/feed/get_author_feed.rs | 20 +- atrium-api/src/app/bsky/feed/get_feed.rs | 12 +- .../src/app/bsky/feed/get_feed_skeleton.rs | 12 +- atrium-api/src/app/bsky/feed/get_likes.rs | 20 +- atrium-api/src/app/bsky/feed/get_list_feed.rs | 12 +- .../src/app/bsky/feed/get_post_thread.rs | 12 +- atrium-api/src/app/bsky/feed/get_quotes.rs | 20 +- .../src/app/bsky/feed/get_reposted_by.rs | 20 +- .../src/app/bsky/feed/get_suggested_feeds.rs | 12 +- atrium-api/src/app/bsky/feed/get_timeline.rs | 16 +- atrium-api/src/app/bsky/feed/post.rs | 28 +- atrium-api/src/app/bsky/feed/postgate.rs | 10 +- atrium-api/src/app/bsky/feed/search_posts.rs | 52 ++-- atrium-api/src/app/bsky/feed/threadgate.rs | 8 +- atrium-api/src/app/bsky/graph/defs.rs | 102 +++--- .../app/bsky/graph/get_actor_starter_packs.rs | 12 +- atrium-api/src/app/bsky/graph/get_blocks.rs | 12 +- .../src/app/bsky/graph/get_followers.rs | 12 +- atrium-api/src/app/bsky/graph/get_follows.rs | 12 +- .../src/app/bsky/graph/get_known_followers.rs | 12 +- atrium-api/src/app/bsky/graph/get_list.rs | 12 +- .../src/app/bsky/graph/get_list_blocks.rs | 12 +- .../src/app/bsky/graph/get_list_mutes.rs | 12 +- atrium-api/src/app/bsky/graph/get_lists.rs | 12 +- atrium-api/src/app/bsky/graph/get_mutes.rs | 12 +- .../src/app/bsky/graph/get_relationships.rs | 8 +- .../graph/get_suggested_follows_by_actor.rs | 4 +- atrium-api/src/app/bsky/graph/list.rs | 18 +- .../app/bsky/graph/search_starter_packs.rs | 12 +- atrium-api/src/app/bsky/graph/starterpack.rs | 14 +- atrium-api/src/app/bsky/labeler/defs.rs | 32 +- .../src/app/bsky/labeler/get_services.rs | 4 +- atrium-api/src/app/bsky/labeler/service.rs | 4 +- .../app/bsky/notification/get_unread_count.rs | 8 +- .../bsky/notification/list_notifications.rs | 36 +-- .../src/app/bsky/unspecced/get_config.rs | 4 +- .../unspecced/get_popular_feed_generators.rs | 16 +- .../unspecced/get_suggestions_skeleton.rs | 24 +- .../bsky/unspecced/search_actors_skeleton.rs | 24 +- .../bsky/unspecced/search_posts_skeleton.rs | 56 ++-- .../search_starter_packs_skeleton.rs | 20 +- atrium-api/src/app/bsky/video/defs.rs | 16 +- .../src/app/bsky/video/get_upload_limits.rs | 16 +- atrium-api/src/chat/bsky/actor/defs.rs | 26 +- atrium-api/src/chat/bsky/convo/defs.rs | 26 +- atrium-api/src/chat/bsky/convo/get_log.rs | 8 +- .../src/chat/bsky/convo/get_messages.rs | 12 +- atrium-api/src/chat/bsky/convo/list_convos.rs | 12 +- atrium-api/src/chat/bsky/convo/update_read.rs | 4 +- .../bsky/moderation/get_message_context.rs | 12 +- .../bsky/moderation/update_actor_access.rs | 4 +- atrium-api/src/com/atproto/admin/defs.rs | 46 +-- .../atproto/admin/disable_account_invites.rs | 4 +- .../com/atproto/admin/disable_invite_codes.rs | 8 +- .../atproto/admin/enable_account_invites.rs | 4 +- .../src/com/atproto/admin/get_invite_codes.rs | 16 +- .../com/atproto/admin/get_subject_status.rs | 20 +- .../src/com/atproto/admin/search_accounts.rs | 16 +- .../src/com/atproto/admin/send_email.rs | 8 +- .../atproto/admin/update_subject_status.rs | 12 +- .../get_recommended_did_credentials.rs | 16 +- .../atproto/identity/sign_plc_operation.rs | 20 +- atrium-api/src/com/atproto/label/defs.rs | 28 +- .../src/com/atproto/label/query_labels.rs | 16 +- .../src/com/atproto/label/subscribe_labels.rs | 8 +- .../com/atproto/moderation/create_report.rs | 8 +- .../src/com/atproto/repo/apply_writes.rs | 28 +- .../src/com/atproto/repo/create_record.rs | 20 +- .../src/com/atproto/repo/delete_record.rs | 12 +- atrium-api/src/com/atproto/repo/get_record.rs | 8 +- .../com/atproto/repo/list_missing_blobs.rs | 12 +- .../src/com/atproto/repo/list_records.rs | 24 +- atrium-api/src/com/atproto/repo/put_record.rs | 20 +- .../src/com/atproto/server/create_account.rs | 36 +-- .../com/atproto/server/create_app_password.rs | 8 +- .../com/atproto/server/create_invite_code.rs | 4 +- .../com/atproto/server/create_invite_codes.rs | 4 +- .../src/com/atproto/server/create_session.rs | 28 +- .../com/atproto/server/deactivate_account.rs | 4 +- .../src/com/atproto/server/describe_server.rs | 28 +- .../server/get_account_invite_codes.rs | 8 +- .../com/atproto/server/get_service_auth.rs | 8 +- .../src/com/atproto/server/get_session.rs | 24 +- .../com/atproto/server/list_app_passwords.rs | 4 +- .../src/com/atproto/server/refresh_session.rs | 12 +- .../com/atproto/server/reserve_signing_key.rs | 4 +- .../src/com/atproto/server/update_email.rs | 8 +- atrium-api/src/com/atproto/sync/get_record.rs | 4 +- atrium-api/src/com/atproto/sync/get_repo.rs | 4 +- .../src/com/atproto/sync/get_repo_status.rs | 8 +- atrium-api/src/com/atproto/sync/list_blobs.rs | 16 +- atrium-api/src/com/atproto/sync/list_repos.rs | 20 +- .../src/com/atproto/sync/subscribe_repos.rs | 32 +- .../com/atproto/temp/check_signup_queue.rs | 8 +- .../src/com/atproto/temp/fetch_labels.rs | 8 +- .../ozone/communication/create_template.rs | 8 +- .../src/tools/ozone/communication/defs.rs | 8 +- .../ozone/communication/update_template.rs | 24 +- atrium-api/src/tools/ozone/moderation/defs.rs | 290 +++++++++--------- .../src/tools/ozone/moderation/emit_event.rs | 4 +- .../src/tools/ozone/moderation/get_record.rs | 4 +- .../tools/ozone/moderation/query_events.rs | 76 ++--- .../tools/ozone/moderation/query_statuses.rs | 112 +++---- .../tools/ozone/moderation/search_repos.rs | 20 +- .../src/tools/ozone/server/get_config.rs | 28 +- atrium-api/src/tools/ozone/set/defs.rs | 8 +- atrium-api/src/tools/ozone/set/get_values.rs | 12 +- atrium-api/src/tools/ozone/set/query_sets.rs | 24 +- atrium-api/src/tools/ozone/setting/defs.rs | 16 +- .../src/tools/ozone/setting/list_options.rs | 24 +- .../src/tools/ozone/setting/upsert_option.rs | 8 +- .../ozone/signature/find_related_accounts.rs | 18 +- .../tools/ozone/signature/search_accounts.rs | 12 +- atrium-api/src/tools/ozone/team/defs.rs | 22 +- .../src/tools/ozone/team/list_members.rs | 12 +- .../src/tools/ozone/team/update_member.rs | 8 +- lexicon/atrium-codegen/src/token_stream.rs | 110 ++----- 131 files changed, 1477 insertions(+), 1499 deletions(-) diff --git a/atrium-api/src/app/bsky/actor/defs.rs b/atrium-api/src/app/bsky/actor/defs.rs index 0b7329bc..45a20bae 100644 --- a/atrium-api/src/app/bsky/actor/defs.rs +++ b/atrium-api/src/app/bsky/actor/defs.rs @@ -17,14 +17,14 @@ pub type BskyAppProgressGuide = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct BskyAppStatePrefData { - #[serde(skip_serializing_if = "Option::is_none")] - pub active_progress_guide: Option, + #[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 = "Option::is_none")] - pub nuxs: Option>, + #[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 = "Option::is_none")] - pub queued_nudges: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub queued_nudges: core::option::Option>, } pub type BskyAppStatePref = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -32,8 +32,8 @@ pub type BskyAppStatePref = crate::types::Object; pub struct ContentLabelPrefData { pub label: String, ///Which labeler does this preference apply to? If undefined, applies globally. - #[serde(skip_serializing_if = "Option::is_none")] - pub labeler_did: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labeler_did: core::option::Option, pub visibility: String, } pub type ContentLabelPref = crate::types::Object; @@ -43,20 +43,20 @@ 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 = "Option::is_none")] - pub hide_quote_posts: Option, + #[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 = "Option::is_none")] - pub hide_replies: Option, + #[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 = "Option::is_none")] - pub hide_replies_by_like_count: Option, + #[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 = "Option::is_none")] - pub hide_replies_by_unfollowed: Option, + #[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 = "Option::is_none")] - pub hide_reposts: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hide_reposts: core::option::Option, } pub type FeedViewPref = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -98,13 +98,13 @@ pub type LabelersPref = crate::types::Object; #[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 = "Option::is_none")] - pub actor_target: Option, + #[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 = "Option::is_none")] - pub expires_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub id: Option, + #[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. @@ -125,11 +125,11 @@ pub type MutedWordsPref = crate::types::Object; 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 = "Option::is_none")] - pub data: Option, + #[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 = "Option::is_none")] - pub expires_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub expires_at: core::option::Option, pub id: String, } pub type Nux = crate::types::Object; @@ -137,24 +137,24 @@ pub type Nux = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct PersonalDetailsPrefData { ///The birth date of account owner. - #[serde(skip_serializing_if = "Option::is_none")] - pub birth_date: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub birth_date: core::option::Option, } pub type PersonalDetailsPref = crate::types::Object; pub type Preferences = Vec>; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ProfileAssociatedData { - #[serde(skip_serializing_if = "Option::is_none")] - pub chat: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub feedgens: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub labeler: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub lists: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub starter_packs: 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 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -166,80 +166,80 @@ pub type ProfileAssociatedChat = crate::types::Object #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ProfileViewData { - #[serde(skip_serializing_if = "Option::is_none")] - pub associated: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, + #[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: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub display_name: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, pub handle: crate::types::string::Handle, - #[serde(skip_serializing_if = "Option::is_none")] - pub indexed_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: Option, + #[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 viewer: core::option::Option, } pub type ProfileView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ProfileViewBasicData { - #[serde(skip_serializing_if = "Option::is_none")] - pub associated: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub created_at: Option, + #[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: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub display_name: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, pub handle: crate::types::string::Handle, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: 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 viewer: core::option::Option, } pub type ProfileViewBasic = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ProfileViewDetailedData { - #[serde(skip_serializing_if = "Option::is_none")] - pub associated: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub banner: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, + #[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: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub display_name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub followers_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub follows_count: 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 followers_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub follows_count: core::option::Option, pub handle: crate::types::string::Handle, - #[serde(skip_serializing_if = "Option::is_none")] - pub indexed_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub joined_via_starter_pack: Option< + #[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 = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub pinned_post: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub posts_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: 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 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 viewer: core::option::Option, } pub type ProfileViewDetailed = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -256,8 +256,8 @@ pub type SavedFeed = crate::types::Object; pub struct SavedFeedsPrefData { pub pinned: Vec, pub saved: Vec, - #[serde(skip_serializing_if = "Option::is_none")] - pub timeline_index: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub timeline_index: core::option::Option, } pub type SavedFeedsPref = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -270,33 +270,37 @@ pub type SavedFeedsPrefV2 = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct ThreadViewPrefData { ///Show followed users at the top of all replies. - #[serde(skip_serializing_if = "Option::is_none")] - pub prioritize_followed_users: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub prioritize_followed_users: core::option::Option, ///Sorting mode for threads. - #[serde(skip_serializing_if = "Option::is_none")] - pub sort: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort: core::option::Option, } pub type ThreadViewPref = crate::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 = "Option::is_none")] - pub blocked_by: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub blocking: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub blocking_by_list: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub followed_by: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub following: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub known_followers: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub muted: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub muted_by_list: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/actor/get_suggestions.rs b/atrium-api/src/app/bsky/actor/get_suggestions.rs index 6e743f35..529b4417 100644 --- a/atrium-api/src/app/bsky/actor/get_suggestions.rs +++ b/atrium-api/src/app/bsky/actor/get_suggestions.rs @@ -4,18 +4,18 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/actor/profile.rs b/atrium-api/src/app/bsky/actor/profile.rs index 4f6c170d..80619d3c 100644 --- a/atrium-api/src/app/bsky/actor/profile.rs +++ b/atrium-api/src/app/bsky/actor/profile.rs @@ -4,25 +4,27 @@ #[serde(rename_all = "camelCase")] pub struct RecordData { ///Small image to be displayed next to posts from account. AKA, 'profile picture' - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, + #[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 = "Option::is_none")] - pub banner: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub created_at: 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, ///Free-form profile description text. - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub display_name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub joined_via_starter_pack: Option, + #[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 = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub pinned_post: 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 pinned_post: core::option::Option, } pub type Record = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/actor/search_actors.rs b/atrium-api/src/app/bsky/actor/search_actors.rs index d4c94880..6c15b9bb 100644 --- a/atrium-api/src/app/bsky/actor/search_actors.rs +++ b/atrium-api/src/app/bsky/actor/search_actors.rs @@ -4,24 +4,24 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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>, ///Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. - #[serde(skip_serializing_if = "Option::is_none")] - pub q: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub q: core::option::Option, ///DEPRECATED: use 'q' instead. - #[serde(skip_serializing_if = "Option::is_none")] - pub term: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub term: core::option::Option, } pub type Parameters = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/actor/search_actors_typeahead.rs b/atrium-api/src/app/bsky/actor/search_actors_typeahead.rs index f670197b..d88bfe86 100644 --- a/atrium-api/src/app/bsky/actor/search_actors_typeahead.rs +++ b/atrium-api/src/app/bsky/actor/search_actors_typeahead.rs @@ -4,14 +4,14 @@ 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 = "Option::is_none")] - pub limit: Option>, + #[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 = "Option::is_none")] - pub q: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub q: core::option::Option, ///DEPRECATED: use 'q' instead. - #[serde(skip_serializing_if = "Option::is_none")] - pub term: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub term: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/embed/external.rs b/atrium-api/src/app/bsky/embed/external.rs index 0b761c6c..1028a512 100644 --- a/atrium-api/src/app/bsky/embed/external.rs +++ b/atrium-api/src/app/bsky/embed/external.rs @@ -11,8 +11,8 @@ pub type Main = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct ExternalData { pub description: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub thumb: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thumb: core::option::Option, pub title: String, pub uri: String, } @@ -27,8 +27,8 @@ pub type View = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct ViewExternalData { pub description: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub thumb: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thumb: core::option::Option, pub title: String, pub uri: String, } diff --git a/atrium-api/src/app/bsky/embed/images.rs b/atrium-api/src/app/bsky/embed/images.rs index 92a45a9b..1606906a 100644 --- a/atrium-api/src/app/bsky/embed/images.rs +++ b/atrium-api/src/app/bsky/embed/images.rs @@ -12,8 +12,8 @@ pub type Main = crate::types::Object; pub struct ImageData { ///Alt text description of the image, for accessibility. pub alt: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub aspect_ratio: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub aspect_ratio: core::option::Option, pub image: crate::types::BlobRef, } pub type Image = crate::types::Object; @@ -28,8 +28,8 @@ pub type View = crate::types::Object; pub struct ViewImageData { ///Alt text description of the image, for accessibility. pub alt: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub aspect_ratio: Option, + #[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. diff --git a/atrium-api/src/app/bsky/embed/record.rs b/atrium-api/src/app/bsky/embed/record.rs index 2a44b3d8..0531a7ff 100644 --- a/atrium-api/src/app/bsky/embed/record.rs +++ b/atrium-api/src/app/bsky/embed/record.rs @@ -40,19 +40,19 @@ pub type ViewNotFound = crate::types::Object; pub struct ViewRecordData { pub author: crate::app::bsky::actor::defs::ProfileViewBasic, pub cid: crate::types::string::Cid, - #[serde(skip_serializing_if = "Option::is_none")] - pub embeds: Option>>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embeds: core::option::Option>>, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub like_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub quote_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub reply_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub repost_count: 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 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: crate::types::Unknown, diff --git a/atrium-api/src/app/bsky/embed/video.rs b/atrium-api/src/app/bsky/embed/video.rs index 83ee63b9..21da5fb3 100644 --- a/atrium-api/src/app/bsky/embed/video.rs +++ b/atrium-api/src/app/bsky/embed/video.rs @@ -5,12 +5,12 @@ #[serde(rename_all = "camelCase")] pub struct MainData { ///Alt text description of the video, for accessibility. - #[serde(skip_serializing_if = "Option::is_none")] - pub alt: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub aspect_ratio: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub captions: Option>, + #[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>, pub video: crate::types::BlobRef, } pub type Main = crate::types::Object; @@ -24,13 +24,13 @@ pub type Caption = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ViewData { - #[serde(skip_serializing_if = "Option::is_none")] - pub alt: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub aspect_ratio: Option, + #[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: crate::types::string::Cid, pub playlist: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub thumbnail: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub thumbnail: core::option::Option, } pub type View = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/defs.rs b/atrium-api/src/app/bsky/feed/defs.rs index 260df312..976f53fd 100644 --- a/atrium-api/src/app/bsky/feed/defs.rs +++ b/atrium-api/src/app/bsky/feed/defs.rs @@ -4,8 +4,8 @@ #[serde(rename_all = "camelCase")] pub struct BlockedAuthorData { pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type BlockedAuthor = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -28,57 +28,59 @@ pub const CLICKTHROUGH_REPOSTER: &str = "app.bsky.feed.defs#clickthroughReposter #[serde(rename_all = "camelCase")] pub struct FeedViewPostData { ///Context provided by feed generator that may be passed back alongside interactions. - #[serde(skip_serializing_if = "Option::is_none")] - pub feed_context: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub feed_context: core::option::Option, pub post: PostView, - #[serde(skip_serializing_if = "Option::is_none")] - pub reason: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub reply: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GeneratorViewData { - #[serde(skip_serializing_if = "Option::is_none")] - pub accepts_interactions: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, + #[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: crate::types::string::Cid, pub creator: crate::app::bsky::actor::defs::ProfileView, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub description_facets: Option>, + #[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: crate::types::string::Did, pub display_name: String, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub like_count: 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 like_count: core::option::Option, pub uri: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type GeneratorView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GeneratorViewerStateData { - #[serde(skip_serializing_if = "Option::is_none")] - pub like: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like: core::option::Option, } pub type GeneratorViewerState = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct InteractionData { - #[serde(skip_serializing_if = "Option::is_none")] - pub event: Option, + #[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 = "Option::is_none")] - pub feed_context: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub item: Option, + #[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 = crate::types::Object; ///User liked the feed item @@ -105,25 +107,25 @@ pub type NotFoundPost = crate::types::Object; pub struct PostViewData { pub author: crate::app::bsky::actor::defs::ProfileViewBasic, pub cid: crate::types::string::Cid, - #[serde(skip_serializing_if = "Option::is_none")] - pub embed: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub embed: core::option::Option>, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub like_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub quote_count: 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 like_count: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub quote_count: core::option::Option, pub record: crate::types::Unknown, - #[serde(skip_serializing_if = "Option::is_none")] - pub reply_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub repost_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub threadgate: 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, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub threadgate: core::option::Option, pub uri: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type PostView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -141,8 +143,10 @@ pub type ReasonRepost = crate::types::Object; #[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 = "Option::is_none")] - pub grandparent_author: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub grandparent_author: core::option::Option< + crate::app::bsky::actor::defs::ProfileViewBasic, + >, pub parent: crate::types::Union, pub root: crate::types::Union, } @@ -155,11 +159,11 @@ pub const REQUEST_MORE: &str = "app.bsky.feed.defs#requestMore"; #[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 = "Option::is_none")] - pub feed_context: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub feed_context: core::option::Option, pub post: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub reason: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reason: core::option::Option>, } pub type SkeletonFeedPost = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -175,42 +179,44 @@ pub type SkeletonReasonRepost = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ThreadViewPostData { - #[serde(skip_serializing_if = "Option::is_none")] - pub parent: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub parent: core::option::Option>, pub post: PostView, - #[serde(skip_serializing_if = "Option::is_none")] - pub replies: Option>>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub replies: core::option::Option< + Vec>, + >, } pub type ThreadViewPost = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ThreadgateViewData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cid: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub lists: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub record: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub uri: Option, + #[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 = crate::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 = "Option::is_none")] - pub embedding_disabled: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub like: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub pinned: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub reply_disabled: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub repost: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub thread_muted: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/feed/describe_feed_generator.rs b/atrium-api/src/app/bsky/feed/describe_feed_generator.rs index 05ace856..54c314ed 100644 --- a/atrium-api/src/app/bsky/feed/describe_feed_generator.rs +++ b/atrium-api/src/app/bsky/feed/describe_feed_generator.rs @@ -6,8 +6,8 @@ pub const NSID: &str = "app.bsky.feed.describeFeedGenerator"; pub struct OutputData { pub did: crate::types::string::Did, pub feeds: Vec, - #[serde(skip_serializing_if = "Option::is_none")] - pub links: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub links: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -27,9 +27,9 @@ pub type Feed = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct LinksData { - #[serde(skip_serializing_if = "Option::is_none")] - pub privacy_policy: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub terms_of_service: Option, + #[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 = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/generator.rs b/atrium-api/src/app/bsky/feed/generator.rs index cf10bd8b..5f47d96b 100644 --- a/atrium-api/src/app/bsky/feed/generator.rs +++ b/atrium-api/src/app/bsky/feed/generator.rs @@ -4,20 +4,22 @@ #[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 = "Option::is_none")] - pub accepts_interactions: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, + #[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 created_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub description_facets: Option>, + #[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: crate::types::string::Did, pub display_name: String, ///Self-label values - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, } pub type Record = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/feed/get_actor_feeds.rs b/atrium-api/src/app/bsky/feed/get_actor_feeds.rs index 0a2cb5b8..ab376333 100644 --- a/atrium-api/src/app/bsky/feed/get_actor_feeds.rs +++ b/atrium-api/src/app/bsky/feed/get_actor_feeds.rs @@ -5,17 +5,17 @@ pub const NSID: &str = "app.bsky.feed.getActorFeeds"; #[serde(rename_all = "camelCase")] pub struct ParametersData { pub actor: crate::types::string::AtIdentifier, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feeds: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/get_actor_likes.rs b/atrium-api/src/app/bsky/feed/get_actor_likes.rs index 5abd9344..91eb1d88 100644 --- a/atrium-api/src/app/bsky/feed/get_actor_likes.rs +++ b/atrium-api/src/app/bsky/feed/get_actor_likes.rs @@ -5,17 +5,17 @@ pub const NSID: &str = "app.bsky.feed.getActorLikes"; #[serde(rename_all = "camelCase")] pub struct ParametersData { pub actor: crate::types::string::AtIdentifier, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feed: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/get_author_feed.rs b/atrium-api/src/app/bsky/feed/get_author_feed.rs index 4a0753bd..16ae21e1 100644 --- a/atrium-api/src/app/bsky/feed/get_author_feed.rs +++ b/atrium-api/src/app/bsky/feed/get_author_feed.rs @@ -5,22 +5,22 @@ pub const NSID: &str = "app.bsky.feed.getAuthorFeed"; #[serde(rename_all = "camelCase")] pub struct ParametersData { pub actor: crate::types::string::AtIdentifier, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub filter: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub include_pins: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feed: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/get_feed.rs b/atrium-api/src/app/bsky/feed/get_feed.rs index 33fbbf75..62f2d936 100644 --- a/atrium-api/src/app/bsky/feed/get_feed.rs +++ b/atrium-api/src/app/bsky/feed/get_feed.rs @@ -4,18 +4,18 @@ 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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feed: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feed: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/get_feed_skeleton.rs b/atrium-api/src/app/bsky/feed/get_feed_skeleton.rs index 8d38c11b..9057288c 100644 --- a/atrium-api/src/app/bsky/feed/get_feed_skeleton.rs +++ b/atrium-api/src/app/bsky/feed/get_feed_skeleton.rs @@ -4,19 +4,19 @@ 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 = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub limit: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feed: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/get_likes.rs b/atrium-api/src/app/bsky/feed/get_likes.rs index 22a1e384..e6f05b0a 100644 --- a/atrium-api/src/app/bsky/feed/get_likes.rs +++ b/atrium-api/src/app/bsky/feed/get_likes.rs @@ -5,12 +5,12 @@ pub const NSID: &str = "app.bsky.feed.getLikes"; #[serde(rename_all = "camelCase")] pub struct ParametersData { ///CID of the subject record (aka, specific version of record), to filter likes. - #[serde(skip_serializing_if = "Option::is_none")] - pub cid: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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, } @@ -18,10 +18,10 @@ pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cid: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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, } diff --git a/atrium-api/src/app/bsky/feed/get_list_feed.rs b/atrium-api/src/app/bsky/feed/get_list_feed.rs index ccc01f1c..4c8ce550 100644 --- a/atrium-api/src/app/bsky/feed/get_list_feed.rs +++ b/atrium-api/src/app/bsky/feed/get_list_feed.rs @@ -4,10 +4,10 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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) to the list record. pub list: String, } @@ -15,8 +15,8 @@ pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feed: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/get_post_thread.rs b/atrium-api/src/app/bsky/feed/get_post_thread.rs index a3ff1fd5..0a3ec8a4 100644 --- a/atrium-api/src/app/bsky/feed/get_post_thread.rs +++ b/atrium-api/src/app/bsky/feed/get_post_thread.rs @@ -5,11 +5,11 @@ pub const NSID: &str = "app.bsky.feed.getPostThread"; #[serde(rename_all = "camelCase")] pub struct ParametersData { ///How many levels of reply depth should be included in response. - #[serde(skip_serializing_if = "Option::is_none")] - pub depth: Option>, + #[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 = "Option::is_none")] - pub parent_height: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub parent_height: core::option::Option>, ///Reference (AT-URI) to post record. pub uri: String, } @@ -18,8 +18,8 @@ pub type Parameters = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct OutputData { pub thread: crate::types::Union, - #[serde(skip_serializing_if = "Option::is_none")] - pub threadgate: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub threadgate: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/feed/get_quotes.rs b/atrium-api/src/app/bsky/feed/get_quotes.rs index f2a9c31e..06669d01 100644 --- a/atrium-api/src/app/bsky/feed/get_quotes.rs +++ b/atrium-api/src/app/bsky/feed/get_quotes.rs @@ -5,12 +5,12 @@ pub const NSID: &str = "app.bsky.feed.getQuotes"; #[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 = "Option::is_none")] - pub cid: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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, } @@ -18,10 +18,10 @@ pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cid: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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, } diff --git a/atrium-api/src/app/bsky/feed/get_reposted_by.rs b/atrium-api/src/app/bsky/feed/get_reposted_by.rs index 841b7f94..585f8a31 100644 --- a/atrium-api/src/app/bsky/feed/get_reposted_by.rs +++ b/atrium-api/src/app/bsky/feed/get_reposted_by.rs @@ -5,12 +5,12 @@ pub const NSID: &str = "app.bsky.feed.getRepostedBy"; #[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 = "Option::is_none")] - pub cid: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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, } @@ -18,10 +18,10 @@ pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cid: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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, } diff --git a/atrium-api/src/app/bsky/feed/get_suggested_feeds.rs b/atrium-api/src/app/bsky/feed/get_suggested_feeds.rs index 9a4ee1b3..d2d510fe 100644 --- a/atrium-api/src/app/bsky/feed/get_suggested_feeds.rs +++ b/atrium-api/src/app/bsky/feed/get_suggested_feeds.rs @@ -4,17 +4,17 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feeds: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/get_timeline.rs b/atrium-api/src/app/bsky/feed/get_timeline.rs index 69770c92..2623cd17 100644 --- a/atrium-api/src/app/bsky/feed/get_timeline.rs +++ b/atrium-api/src/app/bsky/feed/get_timeline.rs @@ -5,19 +5,19 @@ pub const NSID: &str = "app.bsky.feed.getTimeline"; #[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 = "Option::is_none")] - pub algorithm: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feed: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/post.rs b/atrium-api/src/app/bsky/feed/post.rs index 078839a2..638cd2b1 100644 --- a/atrium-api/src/app/bsky/feed/post.rs +++ b/atrium-api/src/app/bsky/feed/post.rs @@ -5,25 +5,25 @@ pub struct RecordData { ///Client-declared timestamp when this post was originally created. pub created_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub embed: Option>, + #[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 = "Option::is_none")] - pub entities: Option>, + #[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 = "Option::is_none")] - pub facets: Option>, + #[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 = "Option::is_none")] - pub labels: Option>, + #[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 = "Option::is_none")] - pub langs: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub reply: Option, + #[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 = "Option::is_none")] - pub tags: Option>, + #[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, } diff --git a/atrium-api/src/app/bsky/feed/postgate.rs b/atrium-api/src/app/bsky/feed/postgate.rs index 119490bb..9948ea39 100644 --- a/atrium-api/src/app/bsky/feed/postgate.rs +++ b/atrium-api/src/app/bsky/feed/postgate.rs @@ -5,10 +5,12 @@ pub struct RecordData { pub created_at: crate::types::string::Datetime, ///List of AT-URIs embedding this post that the author has detached from. - #[serde(skip_serializing_if = "Option::is_none")] - pub detached_embedding_uris: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub embedding_rules: Option>>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub detached_embedding_uris: core::option::Option>, + #[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, } diff --git a/atrium-api/src/app/bsky/feed/search_posts.rs b/atrium-api/src/app/bsky/feed/search_posts.rs index 980fec7e..649e68de 100644 --- a/atrium-api/src/app/bsky/feed/search_posts.rs +++ b/atrium-api/src/app/bsky/feed/search_posts.rs @@ -5,49 +5,49 @@ pub const NSID: &str = "app.bsky.feed.searchPosts"; #[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 = "Option::is_none")] - pub author: Option, + #[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 = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub domain: Option, + #[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 = "Option::is_none")] - pub lang: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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 = "Option::is_none")] - pub mentions: Option, + #[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 = "Option::is_none")] - pub since: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, ///Specifies the ranking order of results. - #[serde(skip_serializing_if = "Option::is_none")] - pub sort: Option, + #[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 = "Option::is_none")] - pub tag: Option>, + #[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 = "Option::is_none")] - pub until: Option, + #[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 = "Option::is_none")] - pub url: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub url: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub hits_total: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hits_total: core::option::Option, pub posts: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/feed/threadgate.rs b/atrium-api/src/app/bsky/feed/threadgate.rs index 6d9d21af..fb5b93cc 100644 --- a/atrium-api/src/app/bsky/feed/threadgate.rs +++ b/atrium-api/src/app/bsky/feed/threadgate.rs @@ -3,12 +3,12 @@ #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RecordData { - #[serde(skip_serializing_if = "Option::is_none")] - pub allow: Option>>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub allow: core::option::Option>>, pub created_at: crate::types::string::Datetime, ///List of hidden reply URIs. - #[serde(skip_serializing_if = "Option::is_none")] - pub hidden_replies: Option>, + #[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, } diff --git a/atrium-api/src/app/bsky/graph/defs.rs b/atrium-api/src/app/bsky/graph/defs.rs index 0bd0a50b..8efb62e4 100644 --- a/atrium-api/src/app/bsky/graph/defs.rs +++ b/atrium-api/src/app/bsky/graph/defs.rs @@ -13,52 +13,54 @@ pub type ListPurpose = String; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListViewData { - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, pub cid: crate::types::string::Cid, pub creator: crate::app::bsky::actor::defs::ProfileView, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub description_facets: Option>, + #[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: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub list_item_count: 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 = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type ListView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListViewBasicData { - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, pub cid: crate::types::string::Cid, - #[serde(skip_serializing_if = "Option::is_none")] - pub indexed_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub list_item_count: Option, + #[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 = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type ListViewBasic = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ListViewerStateData { - #[serde(skip_serializing_if = "Option::is_none")] - pub blocked: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub muted: Option, + #[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 = crate::types::Object; ///A list of actors to apply an aggregate moderation action (mute/block) on. @@ -79,11 +81,11 @@ pub const REFERENCELIST: &str = "app.bsky.graph.defs#referencelist"; pub struct RelationshipData { pub did: crate::types::string::Did, ///if the actor is followed by this DID, contains the AT-URI of the follow record - #[serde(skip_serializing_if = "Option::is_none")] - pub followed_by: Option, + #[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 = "Option::is_none")] - pub following: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub following: core::option::Option, } pub type Relationship = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -91,19 +93,19 @@ pub type Relationship = crate::types::Object; pub struct StarterPackViewData { pub cid: crate::types::string::Cid, pub creator: crate::app::bsky::actor::defs::ProfileViewBasic, - #[serde(skip_serializing_if = "Option::is_none")] - pub feeds: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub feeds: core::option::Option>, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub joined_all_time_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub joined_week_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub list: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub list_items_sample: Option>, + #[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: crate::types::Unknown, pub uri: String, } @@ -114,14 +116,14 @@ pub struct StarterPackViewBasicData { pub cid: crate::types::string::Cid, pub creator: crate::app::bsky::actor::defs::ProfileViewBasic, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub joined_all_time_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub joined_week_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub list_item_count: Option, + #[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: crate::types::Unknown, pub uri: String, } diff --git a/atrium-api/src/app/bsky/graph/get_actor_starter_packs.rs b/atrium-api/src/app/bsky/graph/get_actor_starter_packs.rs index 7733e6dc..5b00ae09 100644 --- a/atrium-api/src/app/bsky/graph/get_actor_starter_packs.rs +++ b/atrium-api/src/app/bsky/graph/get_actor_starter_packs.rs @@ -5,17 +5,17 @@ pub const NSID: &str = "app.bsky.graph.getActorStarterPacks"; #[serde(rename_all = "camelCase")] pub struct ParametersData { pub actor: crate::types::string::AtIdentifier, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub starter_packs: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/graph/get_blocks.rs b/atrium-api/src/app/bsky/graph/get_blocks.rs index 2fea12a4..ee4d151c 100644 --- a/atrium-api/src/app/bsky/graph/get_blocks.rs +++ b/atrium-api/src/app/bsky/graph/get_blocks.rs @@ -4,18 +4,18 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/graph/get_followers.rs b/atrium-api/src/app/bsky/graph/get_followers.rs index b459e95d..dfbd7546 100644 --- a/atrium-api/src/app/bsky/graph/get_followers.rs +++ b/atrium-api/src/app/bsky/graph/get_followers.rs @@ -5,17 +5,17 @@ pub const NSID: &str = "app.bsky.graph.getFollowers"; #[serde(rename_all = "camelCase")] pub struct ParametersData { pub actor: crate::types::string::AtIdentifier, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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, } diff --git a/atrium-api/src/app/bsky/graph/get_follows.rs b/atrium-api/src/app/bsky/graph/get_follows.rs index 18933900..9f9a0067 100644 --- a/atrium-api/src/app/bsky/graph/get_follows.rs +++ b/atrium-api/src/app/bsky/graph/get_follows.rs @@ -5,17 +5,17 @@ pub const NSID: &str = "app.bsky.graph.getFollows"; #[serde(rename_all = "camelCase")] pub struct ParametersData { pub actor: crate::types::string::AtIdentifier, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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, } diff --git a/atrium-api/src/app/bsky/graph/get_known_followers.rs b/atrium-api/src/app/bsky/graph/get_known_followers.rs index 64770c0c..92eacc45 100644 --- a/atrium-api/src/app/bsky/graph/get_known_followers.rs +++ b/atrium-api/src/app/bsky/graph/get_known_followers.rs @@ -5,17 +5,17 @@ pub const NSID: &str = "app.bsky.graph.getKnownFollowers"; #[serde(rename_all = "camelCase")] pub struct ParametersData { pub actor: crate::types::string::AtIdentifier, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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, } diff --git a/atrium-api/src/app/bsky/graph/get_list.rs b/atrium-api/src/app/bsky/graph/get_list.rs index 8693e3af..f4319f58 100644 --- a/atrium-api/src/app/bsky/graph/get_list.rs +++ b/atrium-api/src/app/bsky/graph/get_list.rs @@ -4,10 +4,10 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 the list record to hydrate. pub list: String, } @@ -15,8 +15,8 @@ pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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, } diff --git a/atrium-api/src/app/bsky/graph/get_list_blocks.rs b/atrium-api/src/app/bsky/graph/get_list_blocks.rs index b22edf05..1eeedcbb 100644 --- a/atrium-api/src/app/bsky/graph/get_list_blocks.rs +++ b/atrium-api/src/app/bsky/graph/get_list_blocks.rs @@ -4,17 +4,17 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub lists: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/graph/get_list_mutes.rs b/atrium-api/src/app/bsky/graph/get_list_mutes.rs index c9a8680a..c74f3945 100644 --- a/atrium-api/src/app/bsky/graph/get_list_mutes.rs +++ b/atrium-api/src/app/bsky/graph/get_list_mutes.rs @@ -4,17 +4,17 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub lists: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/graph/get_lists.rs b/atrium-api/src/app/bsky/graph/get_lists.rs index d97b4175..f1639777 100644 --- a/atrium-api/src/app/bsky/graph/get_lists.rs +++ b/atrium-api/src/app/bsky/graph/get_lists.rs @@ -6,17 +6,17 @@ pub const NSID: &str = "app.bsky.graph.getLists"; pub struct ParametersData { ///The account (actor) to enumerate lists from. pub actor: crate::types::string::AtIdentifier, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub lists: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/graph/get_mutes.rs b/atrium-api/src/app/bsky/graph/get_mutes.rs index ac829277..7a93cb10 100644 --- a/atrium-api/src/app/bsky/graph/get_mutes.rs +++ b/atrium-api/src/app/bsky/graph/get_mutes.rs @@ -4,17 +4,17 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub mutes: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/graph/get_relationships.rs b/atrium-api/src/app/bsky/graph/get_relationships.rs index 5d9a78f1..0a33ec18 100644 --- a/atrium-api/src/app/bsky/graph/get_relationships.rs +++ b/atrium-api/src/app/bsky/graph/get_relationships.rs @@ -7,15 +7,15 @@ pub struct ParametersData { ///Primary account requesting relationships for. pub actor: crate::types::string::AtIdentifier, ///List of 'other' accounts to be related back to the primary. - #[serde(skip_serializing_if = "Option::is_none")] - pub others: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub others: core::option::Option>, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub actor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub actor: core::option::Option, pub relationships: Vec>, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/graph/get_suggested_follows_by_actor.rs b/atrium-api/src/app/bsky/graph/get_suggested_follows_by_actor.rs index d667315d..b01b44d8 100644 --- a/atrium-api/src/app/bsky/graph/get_suggested_follows_by_actor.rs +++ b/atrium-api/src/app/bsky/graph/get_suggested_follows_by_actor.rs @@ -11,8 +11,8 @@ pub type Parameters = crate::types::Object; #[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 = "Option::is_none")] - pub is_fallback: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub is_fallback: core::option::Option, pub suggestions: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/graph/list.rs b/atrium-api/src/app/bsky/graph/list.rs index 928ee190..66515876 100644 --- a/atrium-api/src/app/bsky/graph/list.rs +++ b/atrium-api/src/app/bsky/graph/list.rs @@ -3,15 +3,17 @@ #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RecordData { - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub avatar: core::option::Option, pub created_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub description_facets: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, + #[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) diff --git a/atrium-api/src/app/bsky/graph/search_starter_packs.rs b/atrium-api/src/app/bsky/graph/search_starter_packs.rs index ede1e4bc..b6c8b856 100644 --- a/atrium-api/src/app/bsky/graph/search_starter_packs.rs +++ b/atrium-api/src/app/bsky/graph/search_starter_packs.rs @@ -4,10 +4,10 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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>, ///Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. pub q: String, } @@ -15,8 +15,8 @@ pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub starter_packs: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/graph/starterpack.rs b/atrium-api/src/app/bsky/graph/starterpack.rs index d9a8cc1d..8e763336 100644 --- a/atrium-api/src/app/bsky/graph/starterpack.rs +++ b/atrium-api/src/app/bsky/graph/starterpack.rs @@ -4,12 +4,14 @@ #[serde(rename_all = "camelCase")] pub struct RecordData { pub created_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub description_facets: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub feeds: Option>, + #[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. diff --git a/atrium-api/src/app/bsky/labeler/defs.rs b/atrium-api/src/app/bsky/labeler/defs.rs index 7859bcd7..348c600b 100644 --- a/atrium-api/src/app/bsky/labeler/defs.rs +++ b/atrium-api/src/app/bsky/labeler/defs.rs @@ -4,8 +4,8 @@ #[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 = "Option::is_none")] - pub label_value_definitions: Option< + #[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. @@ -18,13 +18,13 @@ pub struct LabelerViewData { pub cid: crate::types::string::Cid, pub creator: crate::app::bsky::actor::defs::ProfileView, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub like_count: 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 like_count: core::option::Option, pub uri: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type LabelerView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -33,20 +33,20 @@ pub struct LabelerViewDetailedData { pub cid: crate::types::string::Cid, pub creator: crate::app::bsky::actor::defs::ProfileView, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub like_count: 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 like_count: core::option::Option, pub policies: crate::app::bsky::labeler::defs::LabelerPolicies, pub uri: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type LabelerViewDetailed = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct LabelerViewerStateData { - #[serde(skip_serializing_if = "Option::is_none")] - pub like: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub like: core::option::Option, } pub type LabelerViewerState = crate::types::Object; diff --git a/atrium-api/src/app/bsky/labeler/get_services.rs b/atrium-api/src/app/bsky/labeler/get_services.rs index 2348bc40..754d12bd 100644 --- a/atrium-api/src/app/bsky/labeler/get_services.rs +++ b/atrium-api/src/app/bsky/labeler/get_services.rs @@ -4,8 +4,8 @@ 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 = "Option::is_none")] - pub detailed: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub detailed: core::option::Option, pub dids: Vec, } pub type Parameters = crate::types::Object; diff --git a/atrium-api/src/app/bsky/labeler/service.rs b/atrium-api/src/app/bsky/labeler/service.rs index 2bd8bc76..d2faa844 100644 --- a/atrium-api/src/app/bsky/labeler/service.rs +++ b/atrium-api/src/app/bsky/labeler/service.rs @@ -4,8 +4,8 @@ #[serde(rename_all = "camelCase")] pub struct RecordData { pub created_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, pub policies: crate::app::bsky::labeler::defs::LabelerPolicies, } pub type Record = crate::types::Object; diff --git a/atrium-api/src/app/bsky/notification/get_unread_count.rs b/atrium-api/src/app/bsky/notification/get_unread_count.rs index 83f83482..76cfc59e 100644 --- a/atrium-api/src/app/bsky/notification/get_unread_count.rs +++ b/atrium-api/src/app/bsky/notification/get_unread_count.rs @@ -4,10 +4,10 @@ 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 = "Option::is_none")] - pub priority: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub seen_at: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/notification/list_notifications.rs b/atrium-api/src/app/bsky/notification/list_notifications.rs index fd81c547..5a59d48d 100644 --- a/atrium-api/src/app/bsky/notification/list_notifications.rs +++ b/atrium-api/src/app/bsky/notification/list_notifications.rs @@ -4,26 +4,26 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub priority: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub seen_at: 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>, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub notifications: Vec, - #[serde(skip_serializing_if = "Option::is_none")] - pub priority: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub seen_at: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -41,12 +41,12 @@ pub struct NotificationData { pub cid: crate::types::string::Cid, pub indexed_at: crate::types::string::Datetime, pub is_read: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, ///Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'. pub reason: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub reason_subject: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reason_subject: core::option::Option, pub record: crate::types::Unknown, pub uri: String, } diff --git a/atrium-api/src/app/bsky/unspecced/get_config.rs b/atrium-api/src/app/bsky/unspecced/get_config.rs index 42d68bd2..383bd983 100644 --- a/atrium-api/src/app/bsky/unspecced/get_config.rs +++ b/atrium-api/src/app/bsky/unspecced/get_config.rs @@ -4,8 +4,8 @@ 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 = "Option::is_none")] - pub check_email_confirmed: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub check_email_confirmed: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/unspecced/get_popular_feed_generators.rs b/atrium-api/src/app/bsky/unspecced/get_popular_feed_generators.rs index 985d6aad..c420bf90 100644 --- a/atrium-api/src/app/bsky/unspecced/get_popular_feed_generators.rs +++ b/atrium-api/src/app/bsky/unspecced/get_popular_feed_generators.rs @@ -4,19 +4,19 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub query: 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>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub query: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub feeds: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/unspecced/get_suggestions_skeleton.rs b/atrium-api/src/app/bsky/unspecced/get_suggestions_skeleton.rs index b338355b..e8ca2d9e 100644 --- a/atrium-api/src/app/bsky/unspecced/get_suggestions_skeleton.rs +++ b/atrium-api/src/app/bsky/unspecced/get_suggestions_skeleton.rs @@ -4,27 +4,27 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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>, ///DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. - #[serde(skip_serializing_if = "Option::is_none")] - pub relative_to_did: Option, + #[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 = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type Parameters = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: 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 = "Option::is_none")] - pub relative_to_did: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub relative_to_did: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/unspecced/search_actors_skeleton.rs b/atrium-api/src/app/bsky/unspecced/search_actors_skeleton.rs index 270b0bb9..4d9e1d3d 100644 --- a/atrium-api/src/app/bsky/unspecced/search_actors_skeleton.rs +++ b/atrium-api/src/app/bsky/unspecced/search_actors_skeleton.rs @@ -5,29 +5,29 @@ pub const NSID: &str = "app.bsky.unspecced.searchActorsSkeleton"; #[serde(rename_all = "camelCase")] pub struct ParametersData { ///Optional pagination mechanism; may not necessarily allow scrolling through entire result set. - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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>, ///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 = "Option::is_none")] - pub typeahead: Option, + #[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 = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type Parameters = crate::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 = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub hits_total: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hits_total: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/app/bsky/unspecced/search_posts_skeleton.rs b/atrium-api/src/app/bsky/unspecced/search_posts_skeleton.rs index 961c7416..6b243eb7 100644 --- a/atrium-api/src/app/bsky/unspecced/search_posts_skeleton.rs +++ b/atrium-api/src/app/bsky/unspecced/search_posts_skeleton.rs @@ -5,52 +5,52 @@ pub const NSID: &str = "app.bsky.unspecced.searchPostsSkeleton"; #[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 = "Option::is_none")] - pub author: Option, + #[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 = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub domain: Option, + #[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 = "Option::is_none")] - pub lang: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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 = "Option::is_none")] - pub mentions: Option, + #[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 = "Option::is_none")] - pub since: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, ///Specifies the ranking order of results. - #[serde(skip_serializing_if = "Option::is_none")] - pub sort: Option, + #[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 = "Option::is_none")] - pub tag: Option>, + #[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 = "Option::is_none")] - pub until: Option, + #[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 = "Option::is_none")] - pub url: Option, + #[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 = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub hits_total: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hits_total: core::option::Option, pub posts: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/unspecced/search_starter_packs_skeleton.rs b/atrium-api/src/app/bsky/unspecced/search_starter_packs_skeleton.rs index 8e1d91d8..dcec9943 100644 --- a/atrium-api/src/app/bsky/unspecced/search_starter_packs_skeleton.rs +++ b/atrium-api/src/app/bsky/unspecced/search_starter_packs_skeleton.rs @@ -5,25 +5,25 @@ pub const NSID: &str = "app.bsky.unspecced.searchStarterPacksSkeleton"; #[serde(rename_all = "camelCase")] pub struct ParametersData { ///Optional pagination mechanism; may not necessarily allow scrolling through entire result set. - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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>, ///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 = "Option::is_none")] - pub viewer: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub hits_total: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hits_total: core::option::Option, pub starter_packs: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/app/bsky/video/defs.rs b/atrium-api/src/app/bsky/video/defs.rs index 15bde4c5..aa5f170b 100644 --- a/atrium-api/src/app/bsky/video/defs.rs +++ b/atrium-api/src/app/bsky/video/defs.rs @@ -3,17 +3,17 @@ #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct JobStatusData { - #[serde(skip_serializing_if = "Option::is_none")] - pub blob: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub blob: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub error: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub error: core::option::Option, pub job_id: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub message: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub message: core::option::Option, ///Progress within the current processing state. - #[serde(skip_serializing_if = "Option::is_none")] - pub progress: Option>, + #[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, } diff --git a/atrium-api/src/app/bsky/video/get_upload_limits.rs b/atrium-api/src/app/bsky/video/get_upload_limits.rs index 0a52a29b..92b32b86 100644 --- a/atrium-api/src/app/bsky/video/get_upload_limits.rs +++ b/atrium-api/src/app/bsky/video/get_upload_limits.rs @@ -5,14 +5,14 @@ pub const NSID: &str = "app.bsky.video.getUploadLimits"; #[serde(rename_all = "camelCase")] pub struct OutputData { pub can_upload: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub error: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub remaining_daily_bytes: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub remaining_daily_videos: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/chat/bsky/actor/defs.rs b/atrium-api/src/chat/bsky/actor/defs.rs index f48fb4d8..587f77b4 100644 --- a/atrium-api/src/chat/bsky/actor/defs.rs +++ b/atrium-api/src/chat/bsky/actor/defs.rs @@ -3,20 +3,22 @@ #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ProfileViewBasicData { - #[serde(skip_serializing_if = "Option::is_none")] - pub associated: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub avatar: Option, + #[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 converations - #[serde(skip_serializing_if = "Option::is_none")] - pub chat_disabled: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub chat_disabled: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub display_name: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub display_name: core::option::Option, pub handle: crate::types::string::Handle, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: 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 viewer: core::option::Option, } pub type ProfileViewBasic = crate::types::Object; diff --git a/atrium-api/src/chat/bsky/convo/defs.rs b/atrium-api/src/chat/bsky/convo/defs.rs index d7735ecd..a221ab1f 100644 --- a/atrium-api/src/chat/bsky/convo/defs.rs +++ b/atrium-api/src/chat/bsky/convo/defs.rs @@ -4,12 +4,14 @@ #[serde(rename_all = "camelCase")] pub struct ConvoViewData { pub id: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub last_message: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub last_message: core::option::Option< + crate::types::Union, + >, pub members: Vec, pub muted: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub opened: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub opened: core::option::Option, pub rev: String, pub unread_count: i64, } @@ -56,11 +58,11 @@ pub type LogLeaveConvo = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MessageInputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub embed: Option>, + #[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 = "Option::is_none")] - pub facets: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub facets: core::option::Option>, pub text: String, } pub type MessageInput = crate::types::Object; @@ -75,11 +77,11 @@ pub type MessageRef = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MessageViewData { - #[serde(skip_serializing_if = "Option::is_none")] - pub embed: Option>, + #[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 = "Option::is_none")] - pub facets: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub facets: core::option::Option>, pub id: String, pub rev: String, pub sender: MessageViewSender, diff --git a/atrium-api/src/chat/bsky/convo/get_log.rs b/atrium-api/src/chat/bsky/convo/get_log.rs index 9af3098a..c04812ba 100644 --- a/atrium-api/src/chat/bsky/convo/get_log.rs +++ b/atrium-api/src/chat/bsky/convo/get_log.rs @@ -4,15 +4,15 @@ 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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub logs: Vec>, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/chat/bsky/convo/get_messages.rs b/atrium-api/src/chat/bsky/convo/get_messages.rs index dfd6c86d..b882a4f7 100644 --- a/atrium-api/src/chat/bsky/convo/get_messages.rs +++ b/atrium-api/src/chat/bsky/convo/get_messages.rs @@ -5,17 +5,17 @@ pub const NSID: &str = "chat.bsky.convo.getMessages"; #[serde(rename_all = "camelCase")] pub struct ParametersData { pub convo_id: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub messages: Vec>, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/chat/bsky/convo/list_convos.rs b/atrium-api/src/chat/bsky/convo/list_convos.rs index 591148d5..1aa70ba5 100644 --- a/atrium-api/src/chat/bsky/convo/list_convos.rs +++ b/atrium-api/src/chat/bsky/convo/list_convos.rs @@ -4,18 +4,18 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/chat/bsky/convo/update_read.rs b/atrium-api/src/chat/bsky/convo/update_read.rs index 68293412..8515173e 100644 --- a/atrium-api/src/chat/bsky/convo/update_read.rs +++ b/atrium-api/src/chat/bsky/convo/update_read.rs @@ -5,8 +5,8 @@ pub const NSID: &str = "chat.bsky.convo.updateRead"; #[serde(rename_all = "camelCase")] pub struct InputData { pub convo_id: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub message_id: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub message_id: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/chat/bsky/moderation/get_message_context.rs b/atrium-api/src/chat/bsky/moderation/get_message_context.rs index f78d85ca..50483276 100644 --- a/atrium-api/src/chat/bsky/moderation/get_message_context.rs +++ b/atrium-api/src/chat/bsky/moderation/get_message_context.rs @@ -4,13 +4,13 @@ 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 = "Option::is_none")] - pub after: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub before: Option, + #[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 = "Option::is_none")] - pub convo_id: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub convo_id: core::option::Option, pub message_id: String, } pub type Parameters = crate::types::Object; diff --git a/atrium-api/src/chat/bsky/moderation/update_actor_access.rs b/atrium-api/src/chat/bsky/moderation/update_actor_access.rs index 79b5a0af..941483d0 100644 --- a/atrium-api/src/chat/bsky/moderation/update_actor_access.rs +++ b/atrium-api/src/chat/bsky/moderation/update_actor_access.rs @@ -6,8 +6,8 @@ pub const NSID: &str = "chat.bsky.moderation.updateActorAccess"; pub struct InputData { pub actor: crate::types::string::Did, pub allow_access: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#ref: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub r#ref: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/admin/defs.rs b/atrium-api/src/com/atproto/admin/defs.rs index 2a8649af..9d543581 100644 --- a/atrium-api/src/com/atproto/admin/defs.rs +++ b/atrium-api/src/com/atproto/admin/defs.rs @@ -3,27 +3,29 @@ #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AccountViewData { - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivated_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated_at: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email_confirmed_at: 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_confirmed_at: core::option::Option, pub handle: crate::types::string::Handle, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub invite_note: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub invited_by: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub invites: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub invites_disabled: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub related_records: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub threat_signatures: Option>, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -31,8 +33,8 @@ pub type AccountView = crate::types::Object; pub struct RepoBlobRefData { pub cid: crate::types::string::Cid, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub record_uri: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub record_uri: core::option::Option, } pub type RepoBlobRef = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -45,8 +47,8 @@ pub type RepoRef = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct StatusAttrData { pub applied: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#ref: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub r#ref: core::option::Option, } pub type StatusAttr = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/admin/disable_account_invites.rs b/atrium-api/src/com/atproto/admin/disable_account_invites.rs index f79458be..ec0a8e8f 100644 --- a/atrium-api/src/com/atproto/admin/disable_account_invites.rs +++ b/atrium-api/src/com/atproto/admin/disable_account_invites.rs @@ -6,8 +6,8 @@ pub const NSID: &str = "com.atproto.admin.disableAccountInvites"; pub struct InputData { pub account: crate::types::string::Did, ///Optional reason for disabled invites. - #[serde(skip_serializing_if = "Option::is_none")] - pub note: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub note: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/admin/disable_invite_codes.rs b/atrium-api/src/com/atproto/admin/disable_invite_codes.rs index 6b66a2c2..37f2e51d 100644 --- a/atrium-api/src/com/atproto/admin/disable_invite_codes.rs +++ b/atrium-api/src/com/atproto/admin/disable_invite_codes.rs @@ -4,10 +4,10 @@ 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 = "Option::is_none")] - pub accounts: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub codes: Option>, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/admin/enable_account_invites.rs b/atrium-api/src/com/atproto/admin/enable_account_invites.rs index 82572a48..fb74dd59 100644 --- a/atrium-api/src/com/atproto/admin/enable_account_invites.rs +++ b/atrium-api/src/com/atproto/admin/enable_account_invites.rs @@ -6,8 +6,8 @@ pub const NSID: &str = "com.atproto.admin.enableAccountInvites"; pub struct InputData { pub account: crate::types::string::Did, ///Optional reason for enabled invites. - #[serde(skip_serializing_if = "Option::is_none")] - pub note: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub note: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/admin/get_invite_codes.rs b/atrium-api/src/com/atproto/admin/get_invite_codes.rs index 750a15d1..bfbd6885 100644 --- a/atrium-api/src/com/atproto/admin/get_invite_codes.rs +++ b/atrium-api/src/com/atproto/admin/get_invite_codes.rs @@ -4,20 +4,20 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub sort: 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>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort: core::option::Option, } pub type Parameters = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/admin/get_subject_status.rs b/atrium-api/src/com/atproto/admin/get_subject_status.rs index 98fdeaf8..53e5ba41 100644 --- a/atrium-api/src/com/atproto/admin/get_subject_status.rs +++ b/atrium-api/src/com/atproto/admin/get_subject_status.rs @@ -4,22 +4,22 @@ 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 = "Option::is_none")] - pub blob: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub did: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub uri: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivated: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated: core::option::Option, pub subject: crate::types::Union, - #[serde(skip_serializing_if = "Option::is_none")] - pub takedown: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takedown: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/admin/search_accounts.rs b/atrium-api/src/com/atproto/admin/search_accounts.rs index 46357fde..1fde4243 100644 --- a/atrium-api/src/com/atproto/admin/search_accounts.rs +++ b/atrium-api/src/com/atproto/admin/search_accounts.rs @@ -4,20 +4,20 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 email: core::option::Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, } pub type Parameters = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/admin/send_email.rs b/atrium-api/src/com/atproto/admin/send_email.rs index 0153e919..5540958d 100644 --- a/atrium-api/src/com/atproto/admin/send_email.rs +++ b/atrium-api/src/com/atproto/admin/send_email.rs @@ -5,13 +5,13 @@ pub const NSID: &str = "com.atproto.admin.sendEmail"; #[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 = "Option::is_none")] - pub comment: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, pub content: String, pub recipient_did: crate::types::string::Did, pub sender_did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub subject: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/admin/update_subject_status.rs b/atrium-api/src/com/atproto/admin/update_subject_status.rs index f1fb33d4..c80ae81c 100644 --- a/atrium-api/src/com/atproto/admin/update_subject_status.rs +++ b/atrium-api/src/com/atproto/admin/update_subject_status.rs @@ -4,19 +4,19 @@ 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 = "Option::is_none")] - pub deactivated: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated: core::option::Option, pub subject: crate::types::Union, - #[serde(skip_serializing_if = "Option::is_none")] - pub takedown: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takedown: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { pub subject: crate::types::Union, - #[serde(skip_serializing_if = "Option::is_none")] - pub takedown: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takedown: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/identity/get_recommended_did_credentials.rs b/atrium-api/src/com/atproto/identity/get_recommended_did_credentials.rs index 3058b505..6853a0d4 100644 --- a/atrium-api/src/com/atproto/identity/get_recommended_did_credentials.rs +++ b/atrium-api/src/com/atproto/identity/get_recommended_did_credentials.rs @@ -4,15 +4,15 @@ 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 = "Option::is_none")] - pub also_known_as: Option>, + #[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 = "Option::is_none")] - pub rotation_keys: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub services: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub verification_methods: 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, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub verification_methods: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/identity/sign_plc_operation.rs b/atrium-api/src/com/atproto/identity/sign_plc_operation.rs index ffe383e0..21de3857 100644 --- a/atrium-api/src/com/atproto/identity/sign_plc_operation.rs +++ b/atrium-api/src/com/atproto/identity/sign_plc_operation.rs @@ -4,17 +4,17 @@ 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 = "Option::is_none")] - pub also_known_as: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub rotation_keys: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub services: Option, + #[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 = "Option::is_none")] - pub token: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub verification_methods: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/label/defs.rs b/atrium-api/src/com/atproto/label/defs.rs index 8ecc14bd..1ffea68b 100644 --- a/atrium-api/src/com/atproto/label/defs.rs +++ b/atrium-api/src/com/atproto/label/defs.rs @@ -5,21 +5,21 @@ #[serde(rename_all = "camelCase")] pub struct LabelData { ///Optionally, CID specifying the specific version of 'uri' resource this label applies to. - #[serde(skip_serializing_if = "Option::is_none")] - pub cid: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, ///Timestamp when this label was created. pub cts: crate::types::string::Datetime, ///Timestamp at which this label expires (no longer applies). - #[serde(skip_serializing_if = "Option::is_none")] - pub exp: Option, + #[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 = "Option::is_none")] - pub neg: Option, + #[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 = "Option::is_none")] - pub sig: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sig: core::option::Option>, ///DID of the actor who created this label. pub src: crate::types::string::Did, ///AT URI of the record, repository (account), or other resource that this label applies to. @@ -27,8 +27,8 @@ pub struct LabelData { ///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 = "Option::is_none")] - pub ver: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub ver: core::option::Option, } pub type Label = crate::types::Object; pub type LabelValue = String; @@ -37,13 +37,13 @@ pub type LabelValue = String; #[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 = "Option::is_none")] - pub adult_only: Option, + #[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 = "Option::is_none")] - pub default_setting: Option, + #[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, diff --git a/atrium-api/src/com/atproto/label/query_labels.rs b/atrium-api/src/com/atproto/label/query_labels.rs index 42950d1f..c85c6eb4 100644 --- a/atrium-api/src/com/atproto/label/query_labels.rs +++ b/atrium-api/src/com/atproto/label/query_labels.rs @@ -4,13 +4,13 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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>, ///Optional list of label sources (DIDs) to filter on. - #[serde(skip_serializing_if = "Option::is_none")] - pub sources: Option>, + #[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, } @@ -18,8 +18,8 @@ pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub labels: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/com/atproto/label/subscribe_labels.rs b/atrium-api/src/com/atproto/label/subscribe_labels.rs index a6268389..fc55e081 100644 --- a/atrium-api/src/com/atproto/label/subscribe_labels.rs +++ b/atrium-api/src/com/atproto/label/subscribe_labels.rs @@ -5,8 +5,8 @@ pub const NSID: &str = "com.atproto.label.subscribeLabels"; #[serde(rename_all = "camelCase")] pub struct ParametersData { ///The last known event seq number to backfill from. - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -30,8 +30,8 @@ impl std::fmt::Display for Error { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct InfoData { - #[serde(skip_serializing_if = "Option::is_none")] - pub message: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub message: core::option::Option, pub name: String, } pub type Info = crate::types::Object; diff --git a/atrium-api/src/com/atproto/moderation/create_report.rs b/atrium-api/src/com/atproto/moderation/create_report.rs index cb5d876f..d753fc2b 100644 --- a/atrium-api/src/com/atproto/moderation/create_report.rs +++ b/atrium-api/src/com/atproto/moderation/create_report.rs @@ -5,8 +5,8 @@ pub const NSID: &str = "com.atproto.moderation.createReport"; #[serde(rename_all = "camelCase")] pub struct InputData { ///Additional context about the content and violation. - #[serde(skip_serializing_if = "Option::is_none")] - pub reason: Option, + #[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: crate::types::Union, @@ -17,8 +17,8 @@ pub type Input = crate::types::Object; pub struct OutputData { pub created_at: crate::types::string::Datetime, pub id: i64, - #[serde(skip_serializing_if = "Option::is_none")] - pub reason: Option, + #[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: crate::types::string::Did, pub subject: crate::types::Union, diff --git a/atrium-api/src/com/atproto/repo/apply_writes.rs b/atrium-api/src/com/atproto/repo/apply_writes.rs index b71151a7..43e3455a 100644 --- a/atrium-api/src/com/atproto/repo/apply_writes.rs +++ b/atrium-api/src/com/atproto/repo/apply_writes.rs @@ -7,21 +7,21 @@ pub struct InputData { ///The handle or DID of the repo (aka, current account). pub repo: crate::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 = "Option::is_none")] - pub swap_commit: Option, + #[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 = "Option::is_none")] - pub validate: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validate: core::option::Option, pub writes: Vec, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub commit: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub results: Option>, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -48,8 +48,8 @@ impl std::fmt::Display for Error { #[serde(rename_all = "camelCase")] pub struct CreateData { pub collection: crate::types::string::Nsid, - #[serde(skip_serializing_if = "Option::is_none")] - pub rkey: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rkey: core::option::Option, pub value: crate::types::Unknown, } pub type Create = crate::types::Object; @@ -58,8 +58,8 @@ pub type Create = crate::types::Object; pub struct CreateResultData { pub cid: crate::types::string::Cid, pub uri: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub validation_status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validation_status: core::option::Option, } pub type CreateResult = crate::types::Object; ///Operation which deletes an existing record. @@ -88,8 +88,8 @@ pub type Update = crate::types::Object; pub struct UpdateResultData { pub cid: crate::types::string::Cid, pub uri: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub validation_status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validation_status: core::option::Option, } pub type UpdateResult = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/repo/create_record.rs b/atrium-api/src/com/atproto/repo/create_record.rs index 1cb8c08a..fc22ffe1 100644 --- a/atrium-api/src/com/atproto/repo/create_record.rs +++ b/atrium-api/src/com/atproto/repo/create_record.rs @@ -11,25 +11,25 @@ pub struct InputData { ///The handle or DID of the repo (aka, current account). pub repo: crate::types::string::AtIdentifier, ///The Record Key. - #[serde(skip_serializing_if = "Option::is_none")] - pub rkey: Option, + #[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 = "Option::is_none")] - pub swap_commit: Option, + #[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 = "Option::is_none")] - pub validate: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validate: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { pub cid: crate::types::string::Cid, - #[serde(skip_serializing_if = "Option::is_none")] - pub commit: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub commit: core::option::Option, pub uri: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub validation_status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validation_status: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/repo/delete_record.rs b/atrium-api/src/com/atproto/repo/delete_record.rs index 5eaee1d7..44748b76 100644 --- a/atrium-api/src/com/atproto/repo/delete_record.rs +++ b/atrium-api/src/com/atproto/repo/delete_record.rs @@ -11,18 +11,18 @@ pub struct InputData { ///The Record Key. pub rkey: String, ///Compare and swap with the previous commit by CID. - #[serde(skip_serializing_if = "Option::is_none")] - pub swap_commit: Option, + #[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 = "Option::is_none")] - pub swap_record: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub swap_record: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub commit: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub commit: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/repo/get_record.rs b/atrium-api/src/com/atproto/repo/get_record.rs index a4995e08..fdd9faf0 100644 --- a/atrium-api/src/com/atproto/repo/get_record.rs +++ b/atrium-api/src/com/atproto/repo/get_record.rs @@ -5,8 +5,8 @@ pub const NSID: &str = "com.atproto.repo.getRecord"; #[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 = "Option::is_none")] - pub cid: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, ///The NSID of the record collection. pub collection: crate::types::string::Nsid, ///The handle or DID of the repo. @@ -18,8 +18,8 @@ pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cid: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, pub uri: String, pub value: crate::types::Unknown, } diff --git a/atrium-api/src/com/atproto/repo/list_missing_blobs.rs b/atrium-api/src/com/atproto/repo/list_missing_blobs.rs index bfd8920a..6041e94e 100644 --- a/atrium-api/src/com/atproto/repo/list_missing_blobs.rs +++ b/atrium-api/src/com/atproto/repo/list_missing_blobs.rs @@ -4,18 +4,18 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/repo/list_records.rs b/atrium-api/src/com/atproto/repo/list_records.rs index d15ca61a..6273c8b5 100644 --- a/atrium-api/src/com/atproto/repo/list_records.rs +++ b/atrium-api/src/com/atproto/repo/list_records.rs @@ -6,29 +6,29 @@ pub const NSID: &str = "com.atproto.repo.listRecords"; pub struct ParametersData { ///The NSID of the record type. pub collection: crate::types::string::Nsid, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, ///The number of records to return. - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, ///The handle or DID of the repo. pub repo: crate::types::string::AtIdentifier, ///Flag to reverse the order of the returned records. - #[serde(skip_serializing_if = "Option::is_none")] - pub reverse: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub reverse: core::option::Option, ///DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) - #[serde(skip_serializing_if = "Option::is_none")] - pub rkey_end: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rkey_end: core::option::Option, ///DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) - #[serde(skip_serializing_if = "Option::is_none")] - pub rkey_start: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub rkey_start: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub records: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/com/atproto/repo/put_record.rs b/atrium-api/src/com/atproto/repo/put_record.rs index 9844c1ea..ba31f977 100644 --- a/atrium-api/src/com/atproto/repo/put_record.rs +++ b/atrium-api/src/com/atproto/repo/put_record.rs @@ -13,25 +13,25 @@ pub struct InputData { ///The Record Key. pub rkey: String, ///Compare and swap with the previous commit by CID. - #[serde(skip_serializing_if = "Option::is_none")] - pub swap_commit: Option, + #[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 = "Option::is_none")] - pub swap_record: Option, + #[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 = "Option::is_none")] - pub validate: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validate: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { pub cid: crate::types::string::Cid, - #[serde(skip_serializing_if = "Option::is_none")] - pub commit: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub commit: core::option::Option, pub uri: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub validation_status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub validation_status: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/server/create_account.rs b/atrium-api/src/com/atproto/server/create_account.rs index 5905ca3c..839b1d8f 100644 --- a/atrium-api/src/com/atproto/server/create_account.rs +++ b/atrium-api/src/com/atproto/server/create_account.rs @@ -5,27 +5,27 @@ pub const NSID: &str = "com.atproto.server.createAccount"; #[serde(rename_all = "camelCase")] pub struct InputData { ///Pre-existing atproto DID, being imported to a new account. - #[serde(skip_serializing_if = "Option::is_none")] - pub did: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email: 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 email: core::option::Option, ///Requested handle for the account. pub handle: crate::types::string::Handle, - #[serde(skip_serializing_if = "Option::is_none")] - pub invite_code: Option, + #[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 = "Option::is_none")] - pub password: Option, + #[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 = "Option::is_none")] - pub plc_op: Option, + #[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 = "Option::is_none")] - pub recovery_key: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub verification_code: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub verification_phone: Option, + #[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 = crate::types::Object; ///Account login session returned on successful account creation. @@ -36,8 +36,8 @@ pub struct OutputData { ///The DID of the new account. pub did: crate::types::string::Did, ///Complete DID document. - #[serde(skip_serializing_if = "Option::is_none")] - pub did_doc: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did_doc: core::option::Option, pub handle: crate::types::string::Handle, pub refresh_jwt: String, } diff --git a/atrium-api/src/com/atproto/server/create_app_password.rs b/atrium-api/src/com/atproto/server/create_app_password.rs index a2524008..829dc975 100644 --- a/atrium-api/src/com/atproto/server/create_app_password.rs +++ b/atrium-api/src/com/atproto/server/create_app_password.rs @@ -7,8 +7,8 @@ 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 = "Option::is_none")] - pub privileged: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub privileged: core::option::Option, } pub type Input = crate::types::Object; pub type Output = AppPassword; @@ -36,7 +36,7 @@ pub struct AppPasswordData { pub created_at: crate::types::string::Datetime, pub name: String, pub password: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub privileged: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub privileged: core::option::Option, } pub type AppPassword = crate::types::Object; diff --git a/atrium-api/src/com/atproto/server/create_invite_code.rs b/atrium-api/src/com/atproto/server/create_invite_code.rs index 2a14f530..87727864 100644 --- a/atrium-api/src/com/atproto/server/create_invite_code.rs +++ b/atrium-api/src/com/atproto/server/create_invite_code.rs @@ -4,8 +4,8 @@ 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 = "Option::is_none")] - pub for_account: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub for_account: core::option::Option, pub use_count: i64, } pub type Input = crate::types::Object; diff --git a/atrium-api/src/com/atproto/server/create_invite_codes.rs b/atrium-api/src/com/atproto/server/create_invite_codes.rs index 65a62659..986f5e15 100644 --- a/atrium-api/src/com/atproto/server/create_invite_codes.rs +++ b/atrium-api/src/com/atproto/server/create_invite_codes.rs @@ -5,8 +5,8 @@ pub const NSID: &str = "com.atproto.server.createInviteCodes"; #[serde(rename_all = "camelCase")] pub struct InputData { pub code_count: i64, - #[serde(skip_serializing_if = "Option::is_none")] - pub for_accounts: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub for_accounts: core::option::Option>, pub use_count: i64, } pub type Input = crate::types::Object; diff --git a/atrium-api/src/com/atproto/server/create_session.rs b/atrium-api/src/com/atproto/server/create_session.rs index 9f0888b4..c3848634 100644 --- a/atrium-api/src/com/atproto/server/create_session.rs +++ b/atrium-api/src/com/atproto/server/create_session.rs @@ -4,8 +4,8 @@ pub const NSID: &str = "com.atproto.server.createSession"; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct InputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub auth_factor_token: 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, @@ -15,22 +15,22 @@ pub type Input = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct OutputData { pub access_jwt: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub active: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub active: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub did_doc: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email_auth_factor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email_confirmed: Option, + #[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: crate::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 = "Option::is_none")] - pub status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/server/deactivate_account.rs b/atrium-api/src/com/atproto/server/deactivate_account.rs index c62985a6..70460a22 100644 --- a/atrium-api/src/com/atproto/server/deactivate_account.rs +++ b/atrium-api/src/com/atproto/server/deactivate_account.rs @@ -5,8 +5,8 @@ pub const NSID: &str = "com.atproto.server.deactivateAccount"; #[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 = "Option::is_none")] - pub delete_after: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub delete_after: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/server/describe_server.rs b/atrium-api/src/com/atproto/server/describe_server.rs index 90989dba..f37156aa 100644 --- a/atrium-api/src/com/atproto/server/describe_server.rs +++ b/atrium-api/src/com/atproto/server/describe_server.rs @@ -7,18 +7,18 @@ 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 = "Option::is_none")] - pub contact: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub contact: core::option::Option, pub did: crate::types::string::Did, ///If true, an invite code must be supplied to create an account on this instance. - #[serde(skip_serializing_if = "Option::is_none")] - pub invite_code_required: Option, + #[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 = "Option::is_none")] - pub links: Option, + #[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 = "Option::is_none")] - pub phone_verification_required: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub phone_verification_required: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -32,16 +32,16 @@ impl std::fmt::Display for Error { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ContactData { - #[serde(skip_serializing_if = "Option::is_none")] - pub email: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, } pub type Contact = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct LinksData { - #[serde(skip_serializing_if = "Option::is_none")] - pub privacy_policy: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub terms_of_service: Option, + #[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 = crate::types::Object; diff --git a/atrium-api/src/com/atproto/server/get_account_invite_codes.rs b/atrium-api/src/com/atproto/server/get_account_invite_codes.rs index 6e7c0bf1..bc85290d 100644 --- a/atrium-api/src/com/atproto/server/get_account_invite_codes.rs +++ b/atrium-api/src/com/atproto/server/get_account_invite_codes.rs @@ -5,10 +5,10 @@ pub const NSID: &str = "com.atproto.server.getAccountInviteCodes"; #[serde(rename_all = "camelCase")] pub struct ParametersData { ///Controls whether any new 'earned' but not 'created' invites should be created. - #[serde(skip_serializing_if = "Option::is_none")] - pub create_available: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub include_used: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/server/get_service_auth.rs b/atrium-api/src/com/atproto/server/get_service_auth.rs index adb76c2a..9eaeb713 100644 --- a/atrium-api/src/com/atproto/server/get_service_auth.rs +++ b/atrium-api/src/com/atproto/server/get_service_auth.rs @@ -7,11 +7,11 @@ pub struct ParametersData { ///The DID of the service that the token will be used to authenticate with pub aud: crate::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 = "Option::is_none")] - pub exp: Option, + #[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 = "Option::is_none")] - pub lxm: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lxm: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/server/get_session.rs b/atrium-api/src/com/atproto/server/get_session.rs index ee8017b5..b8fc03f0 100644 --- a/atrium-api/src/com/atproto/server/get_session.rs +++ b/atrium-api/src/com/atproto/server/get_session.rs @@ -4,21 +4,21 @@ 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 = "Option::is_none")] - pub active: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub active: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub did_doc: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email_auth_factor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email_confirmed: Option, + #[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: crate::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 = "Option::is_none")] - pub status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/server/list_app_passwords.rs b/atrium-api/src/com/atproto/server/list_app_passwords.rs index ba71a634..0e1608db 100644 --- a/atrium-api/src/com/atproto/server/list_app_passwords.rs +++ b/atrium-api/src/com/atproto/server/list_app_passwords.rs @@ -30,7 +30,7 @@ impl std::fmt::Display for Error { pub struct AppPasswordData { pub created_at: crate::types::string::Datetime, pub name: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub privileged: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub privileged: core::option::Option, } pub type AppPassword = crate::types::Object; diff --git a/atrium-api/src/com/atproto/server/refresh_session.rs b/atrium-api/src/com/atproto/server/refresh_session.rs index ce09ac56..13c12b28 100644 --- a/atrium-api/src/com/atproto/server/refresh_session.rs +++ b/atrium-api/src/com/atproto/server/refresh_session.rs @@ -5,16 +5,16 @@ pub const NSID: &str = "com.atproto.server.refreshSession"; #[serde(rename_all = "camelCase")] pub struct OutputData { pub access_jwt: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub active: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub active: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub did_doc: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did_doc: core::option::Option, pub handle: crate::types::string::Handle, pub refresh_jwt: String, ///Hosting status of the account. If not specified, then assume 'active'. - #[serde(skip_serializing_if = "Option::is_none")] - pub status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/server/reserve_signing_key.rs b/atrium-api/src/com/atproto/server/reserve_signing_key.rs index 24222915..5a2017ee 100644 --- a/atrium-api/src/com/atproto/server/reserve_signing_key.rs +++ b/atrium-api/src/com/atproto/server/reserve_signing_key.rs @@ -5,8 +5,8 @@ pub const NSID: &str = "com.atproto.server.reserveSigningKey"; #[serde(rename_all = "camelCase")] pub struct InputData { ///The DID to reserve a key for. - #[serde(skip_serializing_if = "Option::is_none")] - pub did: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub did: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/server/update_email.rs b/atrium-api/src/com/atproto/server/update_email.rs index cf65c12c..659ada32 100644 --- a/atrium-api/src/com/atproto/server/update_email.rs +++ b/atrium-api/src/com/atproto/server/update_email.rs @@ -5,11 +5,11 @@ pub const NSID: &str = "com.atproto.server.updateEmail"; #[serde(rename_all = "camelCase")] pub struct InputData { pub email: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub email_auth_factor: Option, + #[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 = "Option::is_none")] - pub token: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub token: core::option::Option, } pub type Input = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/sync/get_record.rs b/atrium-api/src/com/atproto/sync/get_record.rs index 0d2cf1ac..e6391d1b 100644 --- a/atrium-api/src/com/atproto/sync/get_record.rs +++ b/atrium-api/src/com/atproto/sync/get_record.rs @@ -6,8 +6,8 @@ pub const NSID: &str = "com.atproto.sync.getRecord"; pub struct ParametersData { pub collection: crate::types::string::Nsid, ///DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit - #[serde(skip_serializing_if = "Option::is_none")] - pub commit: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub commit: core::option::Option, ///The DID of the repo. pub did: crate::types::string::Did, ///Record Key diff --git a/atrium-api/src/com/atproto/sync/get_repo.rs b/atrium-api/src/com/atproto/sync/get_repo.rs index bcede4c2..2be271f3 100644 --- a/atrium-api/src/com/atproto/sync/get_repo.rs +++ b/atrium-api/src/com/atproto/sync/get_repo.rs @@ -7,8 +7,8 @@ pub struct ParametersData { ///The DID of the repo. pub did: crate::types::string::Did, ///The revision ('rev') of the repo to create a diff from. - #[serde(skip_serializing_if = "Option::is_none")] - pub since: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/sync/get_repo_status.rs b/atrium-api/src/com/atproto/sync/get_repo_status.rs index fb8a9adb..41cb7cfa 100644 --- a/atrium-api/src/com/atproto/sync/get_repo_status.rs +++ b/atrium-api/src/com/atproto/sync/get_repo_status.rs @@ -14,11 +14,11 @@ pub struct OutputData { pub active: bool, pub did: crate::types::string::Did, ///Optional field, the current rev of the repo, if active=true - #[serde(skip_serializing_if = "Option::is_none")] - pub rev: Option, + #[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 = "Option::is_none")] - pub status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/sync/list_blobs.rs b/atrium-api/src/com/atproto/sync/list_blobs.rs index c609bd16..fae636fb 100644 --- a/atrium-api/src/com/atproto/sync/list_blobs.rs +++ b/atrium-api/src/com/atproto/sync/list_blobs.rs @@ -4,23 +4,23 @@ 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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, ///The DID of the repo. pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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 = "Option::is_none")] - pub since: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, } pub type Parameters = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/sync/list_repos.rs b/atrium-api/src/com/atproto/sync/list_repos.rs index a4969c69..26a127dc 100644 --- a/atrium-api/src/com/atproto/sync/list_repos.rs +++ b/atrium-api/src/com/atproto/sync/list_repos.rs @@ -4,17 +4,17 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub repos: Vec, } pub type Output = crate::types::Object; @@ -29,14 +29,14 @@ impl std::fmt::Display for Error { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RepoData { - #[serde(skip_serializing_if = "Option::is_none")] - pub active: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub active: core::option::Option, pub did: crate::types::string::Did, ///Current repo commit CID pub head: crate::types::string::Cid, pub rev: 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 = "Option::is_none")] - pub status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, } pub type Repo = crate::types::Object; diff --git a/atrium-api/src/com/atproto/sync/subscribe_repos.rs b/atrium-api/src/com/atproto/sync/subscribe_repos.rs index d3476440..e037abbb 100644 --- a/atrium-api/src/com/atproto/sync/subscribe_repos.rs +++ b/atrium-api/src/com/atproto/sync/subscribe_repos.rs @@ -5,8 +5,8 @@ pub const NSID: &str = "com.atproto.sync.subscribeRepos"; #[serde(rename_all = "camelCase")] pub struct ParametersData { ///The last known event seq number to backfill from. - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -44,8 +44,8 @@ pub struct AccountData { pub did: crate::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 = "Option::is_none")] - pub status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub status: core::option::Option, pub time: crate::types::string::Datetime, } pub type Account = crate::types::Object; @@ -61,8 +61,8 @@ pub struct CommitData { pub commit: crate::types::CidLink, pub ops: Vec, ///DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability. - #[serde(skip_serializing_if = "Option::is_none")] - pub prev: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub prev: core::option::Option, ///DEPRECATED -- unused pub rebase: bool, ///The repo this event comes from. @@ -72,8 +72,8 @@ pub struct CommitData { ///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 = "Option::is_none")] - pub since: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub since: core::option::Option, ///Timestamp of when this message was originally broadcast. pub time: crate::types::string::Datetime, ///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. @@ -96,8 +96,8 @@ pub type Handle = crate::types::Object; pub struct IdentityData { pub did: crate::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 = "Option::is_none")] - pub handle: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub handle: core::option::Option, pub seq: i64, pub time: crate::types::string::Datetime, } @@ -105,8 +105,8 @@ pub type Identity = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct InfoData { - #[serde(skip_serializing_if = "Option::is_none")] - pub message: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub message: core::option::Option, pub name: String, } pub type Info = crate::types::Object; @@ -115,8 +115,8 @@ pub type Info = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct MigrateData { pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub migrate_to: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub migrate_to: core::option::Option, pub seq: i64, pub time: crate::types::string::Datetime, } @@ -127,8 +127,8 @@ pub type Migrate = crate::types::Object; pub struct RepoOpData { pub action: String, ///For creates and updates, the new record CID. For deletions, null. - #[serde(skip_serializing_if = "Option::is_none")] - pub cid: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, pub path: String, } pub type RepoOp = crate::types::Object; diff --git a/atrium-api/src/com/atproto/temp/check_signup_queue.rs b/atrium-api/src/com/atproto/temp/check_signup_queue.rs index 7e08c7df..a1cf71a3 100644 --- a/atrium-api/src/com/atproto/temp/check_signup_queue.rs +++ b/atrium-api/src/com/atproto/temp/check_signup_queue.rs @@ -5,10 +5,10 @@ pub const NSID: &str = "com.atproto.temp.checkSignupQueue"; #[serde(rename_all = "camelCase")] pub struct OutputData { pub activated: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub estimated_time_ms: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub place_in_queue: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/com/atproto/temp/fetch_labels.rs b/atrium-api/src/com/atproto/temp/fetch_labels.rs index fbb43784..c5c6d95c 100644 --- a/atrium-api/src/com/atproto/temp/fetch_labels.rs +++ b/atrium-api/src/com/atproto/temp/fetch_labels.rs @@ -4,10 +4,10 @@ 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 = "Option::is_none")] - pub limit: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub since: 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 since: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/tools/ozone/communication/create_template.rs b/atrium-api/src/tools/ozone/communication/create_template.rs index 9cbe8db3..33c40dc1 100644 --- a/atrium-api/src/tools/ozone/communication/create_template.rs +++ b/atrium-api/src/tools/ozone/communication/create_template.rs @@ -7,11 +7,11 @@ 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 = "Option::is_none")] - pub created_by: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_by: core::option::Option, ///Message language. - #[serde(skip_serializing_if = "Option::is_none")] - pub lang: Option, + #[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. diff --git a/atrium-api/src/tools/ozone/communication/defs.rs b/atrium-api/src/tools/ozone/communication/defs.rs index 262a12c0..c37b992c 100644 --- a/atrium-api/src/tools/ozone/communication/defs.rs +++ b/atrium-api/src/tools/ozone/communication/defs.rs @@ -9,15 +9,15 @@ pub struct TemplateViewData { pub disabled: bool, pub id: String, ///Message language. - #[serde(skip_serializing_if = "Option::is_none")] - pub lang: Option, + #[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: crate::types::string::Did, ///Name of the template. pub name: String, ///Content of the template, can contain markdown and variable placeholders. - #[serde(skip_serializing_if = "Option::is_none")] - pub subject: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject: core::option::Option, pub updated_at: crate::types::string::Datetime, } pub type TemplateView = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/communication/update_template.rs b/atrium-api/src/tools/ozone/communication/update_template.rs index db27d8a2..c4192b83 100644 --- a/atrium-api/src/tools/ozone/communication/update_template.rs +++ b/atrium-api/src/tools/ozone/communication/update_template.rs @@ -5,24 +5,24 @@ pub const NSID: &str = "tools.ozone.communication.updateTemplate"; #[serde(rename_all = "camelCase")] pub struct InputData { ///Content of the template, markdown supported, can contain variable placeholders. - #[serde(skip_serializing_if = "Option::is_none")] - pub content_markdown: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub disabled: Option, + #[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 = "Option::is_none")] - pub lang: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub lang: core::option::Option, ///Name of the template. - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, + #[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 = "Option::is_none")] - pub subject: Option, + #[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 = "Option::is_none")] - pub updated_by: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_by: core::option::Option, } pub type Input = crate::types::Object; pub type Output = crate::tools::ozone::communication::defs::TemplateView; diff --git a/atrium-api/src/tools/ozone/moderation/defs.rs b/atrium-api/src/tools/ozone/moderation/defs.rs index 15527c26..92923fbb 100644 --- a/atrium-api/src/tools/ozone/moderation/defs.rs +++ b/atrium-api/src/tools/ozone/moderation/defs.rs @@ -6,27 +6,27 @@ 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 = "Option::is_none")] - pub comment: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub status: Option, + #[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: crate::types::string::Datetime, } pub type AccountEvent = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AccountHostingData { - #[serde(skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivated_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub deleted_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub reactivated_at: 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 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 = "Option::is_none")] - pub updated_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_at: core::option::Option, } pub type AccountHosting = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -34,11 +34,11 @@ pub type AccountHosting = crate::types::Object; pub struct BlobViewData { pub cid: crate::types::string::Cid, pub created_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub details: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub details: core::option::Option>, pub mime_type: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub moderation: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub moderation: core::option::Option, pub size: i64, } pub type BlobView = crate::types::Object; @@ -46,15 +46,15 @@ pub type BlobView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct IdentityEventData { - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub handle: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub pds_host: Option, + #[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: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub tombstone: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub tombstone: core::option::Option, } pub type IdentityEvent = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -67,8 +67,8 @@ pub type ImageDetails = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventAcknowledgeData { - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, } pub type ModEventAcknowledge = crate::types::Object; ///Add a comment to a subject @@ -77,16 +77,16 @@ pub type ModEventAcknowledge = crate::types::Object; pub struct ModEventCommentData { pub comment: String, ///Make the comment persistent on the subject - #[serde(skip_serializing_if = "Option::is_none")] - pub sticky: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sticky: core::option::Option, } pub type ModEventComment = crate::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 = "Option::is_none")] - pub comment: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, } pub type ModEventDivert = crate::types::Object; ///Keep a log of outgoing email to a user @@ -94,11 +94,11 @@ pub type ModEventDivert = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct ModEventEmailData { ///Additional comment about the outgoing comm. - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[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 = "Option::is_none")] - pub content: Option, + #[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, } @@ -106,16 +106,16 @@ pub type ModEventEmail = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventEscalateData { - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, } pub type ModEventEscalate = crate::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 = "Option::is_none")] - pub comment: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, pub create_label_vals: Vec, pub negate_label_vals: Vec, } @@ -124,8 +124,8 @@ pub type ModEventLabel = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventMuteData { - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[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, } @@ -134,22 +134,22 @@ pub type ModEventMute = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModEventMuteReporterData { - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[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 = "Option::is_none")] - pub duration_in_hours: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub duration_in_hours: core::option::Option, } pub type ModEventMuteReporter = crate::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 = "Option::is_none")] - pub comment: Option, + #[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 = "Option::is_none")] - pub is_reporter_muted: Option, + #[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 = crate::types::Object; @@ -158,8 +158,8 @@ pub type ModEventReport = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct ModEventResolveAppealData { ///Describe resolution. - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, } pub type ModEventResolveAppeal = crate::types::Object; ///Revert take down action on a subject @@ -167,8 +167,8 @@ pub type ModEventResolveAppeal = crate::types::Object #[serde(rename_all = "camelCase")] pub struct ModEventReverseTakedownData { ///Describe reasoning behind the reversal. - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, } pub type ModEventReverseTakedown = crate::types::Object; ///Add/Remove a tag on a subject @@ -178,8 +178,8 @@ 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 = "Option::is_none")] - pub comment: Option, + #[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, } @@ -189,13 +189,13 @@ pub type ModEventTag = crate::types::Object; #[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 = "Option::is_none")] - pub acknowledge_account_subjects: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[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 = "Option::is_none")] - pub duration_in_hours: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub duration_in_hours: core::option::Option, } pub type ModEventTakedown = crate::types::Object; ///Unmute action on a subject @@ -203,8 +203,8 @@ pub type ModEventTakedown = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct ModEventUnmuteData { ///Describe reasoning behind the reversal. - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, } pub type ModEventUnmute = crate::types::Object; ///Unmute incoming reports from an account @@ -212,8 +212,8 @@ pub type ModEventUnmute = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct ModEventUnmuteReporterData { ///Describe reasoning behind the reversal. - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub comment: core::option::Option, } pub type ModEventUnmuteReporter = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -221,14 +221,14 @@ pub type ModEventUnmuteReporter = crate::types::Object, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub creator_handle: core::option::Option, pub event: crate::types::Union, pub id: i64, pub subject: crate::types::Union, pub subject_blob_cids: Vec, - #[serde(skip_serializing_if = "Option::is_none")] - pub subject_handle: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_handle: core::option::Option, } pub type ModEventView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -245,25 +245,25 @@ pub type ModEventViewDetail = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModerationData { - #[serde(skip_serializing_if = "Option::is_none")] - pub subject_status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_status: core::option::Option, } pub type Moderation = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModerationDetailData { - #[serde(skip_serializing_if = "Option::is_none")] - pub subject_status: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_status: core::option::Option, } pub type ModerationDetail = crate::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 = "Option::is_none")] - pub cid: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[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: crate::types::string::Datetime, } @@ -271,13 +271,13 @@ pub type RecordEvent = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RecordHostingData { - #[serde(skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub deleted_at: 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 deleted_at: core::option::Option, pub status: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub updated_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_at: core::option::Option, } pub type RecordHosting = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -298,8 +298,8 @@ pub struct RecordViewDetailData { pub blobs: Vec, pub cid: crate::types::string::Cid, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub labels: core::option::Option>, pub moderation: ModerationDetail, pub repo: RepoView, pub uri: String, @@ -315,23 +315,23 @@ pub type RecordViewNotFound = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RepoViewData { - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivated_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated_at: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub email: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub email: core::option::Option, pub handle: crate::types::string::Handle, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub invite_note: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub invited_by: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub invites_disabled: Option, + #[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 = "Option::is_none")] - pub threat_signatures: Option< + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub threat_signatures: core::option::Option< Vec, >, } @@ -339,29 +339,31 @@ pub type RepoView = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct RepoViewDetailData { - #[serde(skip_serializing_if = "Option::is_none")] - pub deactivated_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub deactivated_at: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub email: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub email_confirmed_at: 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_confirmed_at: core::option::Option, pub handle: crate::types::string::Handle, pub indexed_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub invite_note: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub invited_by: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub invites: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub invites_disabled: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub labels: Option>, + #[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 = "Option::is_none")] - pub threat_signatures: Option< + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub threat_signatures: core::option::Option< Vec, >, } @@ -385,41 +387,41 @@ pub type SubjectReviewState = String; #[serde(rename_all = "camelCase")] pub struct SubjectStatusViewData { ///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 = "Option::is_none")] - pub appealed: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub appealed: core::option::Option, ///Sticky comment on the subject. - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[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: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub hosting: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hosting: core::option::Option>, pub id: i64, ///Timestamp referencing when the author of the subject appealed a moderation action - #[serde(skip_serializing_if = "Option::is_none")] - pub last_appealed_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub last_reported_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub last_reviewed_at: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub last_reviewed_by: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub mute_reporting_until: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub mute_until: Option, + #[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, pub review_state: SubjectReviewState, pub subject: crate::types::Union, - #[serde(skip_serializing_if = "Option::is_none")] - pub subject_blob_cids: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub subject_repo_handle: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub suspend_until: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub tags: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub takendown: Option, + #[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: crate::types::string::Datetime, } diff --git a/atrium-api/src/tools/ozone/moderation/emit_event.rs b/atrium-api/src/tools/ozone/moderation/emit_event.rs index 3987e0d2..dad963ee 100644 --- a/atrium-api/src/tools/ozone/moderation/emit_event.rs +++ b/atrium-api/src/tools/ozone/moderation/emit_event.rs @@ -7,8 +7,8 @@ pub struct InputData { pub created_by: crate::types::string::Did, pub event: crate::types::Union, pub subject: crate::types::Union, - #[serde(skip_serializing_if = "Option::is_none")] - pub subject_blob_cids: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub subject_blob_cids: core::option::Option>, } pub type Input = crate::types::Object; pub type Output = crate::tools::ozone::moderation::defs::ModEventView; diff --git a/atrium-api/src/tools/ozone/moderation/get_record.rs b/atrium-api/src/tools/ozone/moderation/get_record.rs index 281ea473..d1af25c8 100644 --- a/atrium-api/src/tools/ozone/moderation/get_record.rs +++ b/atrium-api/src/tools/ozone/moderation/get_record.rs @@ -4,8 +4,8 @@ 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 = "Option::is_none")] - pub cid: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cid: core::option::Option, pub uri: String, } pub type Parameters = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/moderation/query_events.rs b/atrium-api/src/tools/ozone/moderation/query_events.rs index 9f58e398..e66fa1c0 100644 --- a/atrium-api/src/tools/ozone/moderation/query_events.rs +++ b/atrium-api/src/tools/ozone/moderation/query_events.rs @@ -5,61 +5,61 @@ pub const NSID: &str = "tools.ozone.moderation.queryEvents"; #[serde(rename_all = "camelCase")] pub struct ParametersData { ///If specified, only events where all of these labels were added are returned - #[serde(skip_serializing_if = "Option::is_none")] - pub added_labels: Option>, + #[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 = "Option::is_none")] - pub added_tags: Option>, + #[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 = "Option::is_none")] - pub collections: Option>, + #[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 - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, + #[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 = "Option::is_none")] - pub created_after: Option, + #[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 = "Option::is_none")] - pub created_before: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub created_by: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub has_comment: Option, + #[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 = "Option::is_none")] - pub include_all_user_records: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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>, ///If specified, only events where all of these labels were removed are returned - #[serde(skip_serializing_if = "Option::is_none")] - pub removed_labels: Option>, + #[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 = "Option::is_none")] - pub removed_tags: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub report_types: Option>, + #[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 = "Option::is_none")] - pub sort_direction: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub subject: 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 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 = "Option::is_none")] - pub subject_type: Option, + #[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 = "Option::is_none")] - pub types: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub types: core::option::Option>, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub events: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/moderation/query_statuses.rs b/atrium-api/src/tools/ozone/moderation/query_statuses.rs index aa3fe3cb..b5a32be4 100644 --- a/atrium-api/src/tools/ozone/moderation/query_statuses.rs +++ b/atrium-api/src/tools/ozone/moderation/query_statuses.rs @@ -5,86 +5,86 @@ pub const NSID: &str = "tools.ozone.moderation.queryStatuses"; #[serde(rename_all = "camelCase")] pub struct ParametersData { ///Get subjects in unresolved appealed status - #[serde(skip_serializing_if = "Option::is_none")] - pub appealed: Option, + #[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 = "Option::is_none")] - pub collections: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub collections: core::option::Option>, ///Search subjects by keyword from comments - #[serde(skip_serializing_if = "Option::is_none")] - pub comment: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub exclude_tags: Option>, + #[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 = "Option::is_none")] - pub hosting_deleted_after: Option, + #[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 = "Option::is_none")] - pub hosting_deleted_before: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hosting_deleted_before: core::option::Option, ///Search subjects by the status of the associated record/account - #[serde(skip_serializing_if = "Option::is_none")] - pub hosting_statuses: Option>, + #[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 = "Option::is_none")] - pub hosting_updated_after: Option, + #[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 = "Option::is_none")] - pub hosting_updated_before: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub ignore_subjects: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub hosting_updated_before: core::option::Option, + #[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 = "Option::is_none")] - pub include_all_user_records: Option, + #[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 = "Option::is_none")] - pub include_muted: Option, + #[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 = "Option::is_none")] - pub last_reviewed_by: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 limit: core::option::Option>, ///When set to true, only muted subjects and reporters will be returned. - #[serde(skip_serializing_if = "Option::is_none")] - pub only_muted: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub only_muted: core::option::Option, ///Search subjects reported after a given timestamp - #[serde(skip_serializing_if = "Option::is_none")] - pub reported_after: Option, + #[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 = "Option::is_none")] - pub reported_before: Option, + #[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 = "Option::is_none")] - pub review_state: Option, + #[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 = "Option::is_none")] - pub reviewed_after: Option, + #[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 = "Option::is_none")] - pub reviewed_before: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub sort_direction: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub sort_field: Option, + #[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 = "Option::is_none")] - pub subject: Option, + #[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 = "Option::is_none")] - pub subject_type: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub tags: Option>, + #[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 = "Option::is_none")] - pub takendown: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub takendown: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub subject_statuses: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/moderation/search_repos.rs b/atrium-api/src/tools/ozone/moderation/search_repos.rs index f793ee46..bb748d76 100644 --- a/atrium-api/src/tools/ozone/moderation/search_repos.rs +++ b/atrium-api/src/tools/ozone/moderation/search_repos.rs @@ -4,22 +4,22 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub q: 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>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub q: core::option::Option, ///DEPRECATED: use 'q' instead - #[serde(skip_serializing_if = "Option::is_none")] - pub term: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub term: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub repos: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/server/get_config.rs b/atrium-api/src/tools/ozone/server/get_config.rs index c4ee5242..f727cf5e 100644 --- a/atrium-api/src/tools/ozone/server/get_config.rs +++ b/atrium-api/src/tools/ozone/server/get_config.rs @@ -4,16 +4,16 @@ 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 = "Option::is_none")] - pub appview: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub blob_divert: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub chat: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub pds: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub viewer: Option, + #[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, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub viewer: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -27,14 +27,14 @@ impl std::fmt::Display for Error { #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ServiceConfigData { - #[serde(skip_serializing_if = "Option::is_none")] - pub url: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub url: core::option::Option, } pub type ServiceConfig = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ViewerConfigData { - #[serde(skip_serializing_if = "Option::is_none")] - pub role: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub role: core::option::Option, } pub type ViewerConfig = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/set/defs.rs b/atrium-api/src/tools/ozone/set/defs.rs index 17b604b6..b16df0b2 100644 --- a/atrium-api/src/tools/ozone/set/defs.rs +++ b/atrium-api/src/tools/ozone/set/defs.rs @@ -3,8 +3,8 @@ #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SetData { - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, pub name: String, } pub type Set = crate::types::Object; @@ -12,8 +12,8 @@ pub type Set = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct SetViewData { pub created_at: crate::types::string::Datetime, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, pub name: String, pub set_size: i64, pub updated_at: crate::types::string::Datetime, diff --git a/atrium-api/src/tools/ozone/set/get_values.rs b/atrium-api/src/tools/ozone/set/get_values.rs index 996c2237..c5569986 100644 --- a/atrium-api/src/tools/ozone/set/get_values.rs +++ b/atrium-api/src/tools/ozone/set/get_values.rs @@ -4,18 +4,18 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 name: String, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[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, } diff --git a/atrium-api/src/tools/ozone/set/query_sets.rs b/atrium-api/src/tools/ozone/set/query_sets.rs index e0d1b485..1489e606 100644 --- a/atrium-api/src/tools/ozone/set/query_sets.rs +++ b/atrium-api/src/tools/ozone/set/query_sets.rs @@ -4,24 +4,24 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub name_prefix: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub sort_by: 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>, + #[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 = "Option::is_none")] - pub sort_direction: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub sort_direction: core::option::Option, } pub type Parameters = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub sets: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/setting/defs.rs b/atrium-api/src/tools/ozone/setting/defs.rs index 7d8d55d8..0b75c6ee 100644 --- a/atrium-api/src/tools/ozone/setting/defs.rs +++ b/atrium-api/src/tools/ozone/setting/defs.rs @@ -3,19 +3,19 @@ #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OptionData { - #[serde(skip_serializing_if = "Option::is_none")] - pub created_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, pub created_by: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, pub did: crate::types::string::Did, pub key: crate::types::string::Nsid, pub last_updated_by: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub manager_role: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub manager_role: core::option::Option, pub scope: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub updated_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_at: core::option::Option, pub value: crate::types::Unknown, } pub type Option = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/setting/list_options.rs b/atrium-api/src/tools/ozone/setting/list_options.rs index 2d849543..363dfd37 100644 --- a/atrium-api/src/tools/ozone/setting/list_options.rs +++ b/atrium-api/src/tools/ozone/setting/list_options.rs @@ -4,25 +4,25 @@ 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 = "Option::is_none")] - pub cursor: Option, + #[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 = "Option::is_none")] - pub keys: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[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 = "Option::is_none")] - pub prefix: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub scope: Option, + #[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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub options: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/setting/upsert_option.rs b/atrium-api/src/tools/ozone/setting/upsert_option.rs index dfc4049a..4ed650a8 100644 --- a/atrium-api/src/tools/ozone/setting/upsert_option.rs +++ b/atrium-api/src/tools/ozone/setting/upsert_option.rs @@ -4,11 +4,11 @@ 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 = "Option::is_none")] - pub description: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub description: core::option::Option, pub key: crate::types::string::Nsid, - #[serde(skip_serializing_if = "Option::is_none")] - pub manager_role: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub manager_role: core::option::Option, pub scope: String, pub value: crate::types::Unknown, } diff --git a/atrium-api/src/tools/ozone/signature/find_related_accounts.rs b/atrium-api/src/tools/ozone/signature/find_related_accounts.rs index ba06ecad..fbcc8071 100644 --- a/atrium-api/src/tools/ozone/signature/find_related_accounts.rs +++ b/atrium-api/src/tools/ozone/signature/find_related_accounts.rs @@ -4,19 +4,19 @@ 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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub limit: core::option::Option>, } pub type Parameters = crate::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 = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] @@ -31,7 +31,9 @@ impl std::fmt::Display for Error { #[serde(rename_all = "camelCase")] pub struct RelatedAccountData { pub account: crate::com::atproto::admin::defs::AccountView, - #[serde(skip_serializing_if = "Option::is_none")] - pub similarities: Option>, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub similarities: core::option::Option< + Vec, + >, } pub type RelatedAccount = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/signature/search_accounts.rs b/atrium-api/src/tools/ozone/signature/search_accounts.rs index cae665f6..da605f3a 100644 --- a/atrium-api/src/tools/ozone/signature/search_accounts.rs +++ b/atrium-api/src/tools/ozone/signature/search_accounts.rs @@ -4,10 +4,10 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 values: Vec, } pub type Parameters = crate::types::Object; @@ -15,8 +15,8 @@ pub type Parameters = crate::types::Object; #[serde(rename_all = "camelCase")] pub struct OutputData { pub accounts: Vec, - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, } pub type Output = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] diff --git a/atrium-api/src/tools/ozone/team/defs.rs b/atrium-api/src/tools/ozone/team/defs.rs index f4f98dfc..4c0a2560 100644 --- a/atrium-api/src/tools/ozone/team/defs.rs +++ b/atrium-api/src/tools/ozone/team/defs.rs @@ -3,18 +3,20 @@ #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct MemberData { - #[serde(skip_serializing_if = "Option::is_none")] - pub created_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub created_at: core::option::Option, pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub disabled: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub last_updated_by: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub profile: 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 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 = "Option::is_none")] - pub updated_at: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub updated_at: core::option::Option, } pub type Member = crate::types::Object; ///Admin role. Highest level of access, can perform all actions. diff --git a/atrium-api/src/tools/ozone/team/list_members.rs b/atrium-api/src/tools/ozone/team/list_members.rs index 88ad7501..ff944626 100644 --- a/atrium-api/src/tools/ozone/team/list_members.rs +++ b/atrium-api/src/tools/ozone/team/list_members.rs @@ -4,17 +4,17 @@ 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 = "Option::is_none")] - pub cursor: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub limit: 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 = crate::types::Object; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct OutputData { - #[serde(skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(skip_serializing_if = "core::option::Option::is_none")] + pub cursor: core::option::Option, pub members: Vec, } pub type Output = crate::types::Object; diff --git a/atrium-api/src/tools/ozone/team/update_member.rs b/atrium-api/src/tools/ozone/team/update_member.rs index 906b9a83..0903b64e 100644 --- a/atrium-api/src/tools/ozone/team/update_member.rs +++ b/atrium-api/src/tools/ozone/team/update_member.rs @@ -5,10 +5,10 @@ pub const NSID: &str = "tools.ozone.team.updateMember"; #[serde(rename_all = "camelCase")] pub struct InputData { pub did: crate::types::string::Did, - #[serde(skip_serializing_if = "Option::is_none")] - pub disabled: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub role: 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 role: core::option::Option, } pub type Input = crate::types::Object; pub type Output = crate::tools::ozone::team::defs::Member; diff --git a/lexicon/atrium-codegen/src/token_stream.rs b/lexicon/atrium-codegen/src/token_stream.rs index a0277b22..2324a7b4 100644 --- a/lexicon/atrium-codegen/src/token_stream.rs +++ b/lexicon/atrium-codegen/src/token_stream.rs @@ -135,9 +135,7 @@ fn xrpc_body(body: &LexXrpcBody, name: &str) -> Result { fn xrpc_errors(errors: &Option>) -> Result { let derives = derives()?; let errors = errors.as_ref().map_or(Vec::new(), |e| { - e.iter() - .map(|error| (error.name.clone(), error.description.clone())) - .collect() + e.iter().map(|error| (error.name.clone(), error.description.clone())).collect() }); let enum_variants: Vec = errors .iter() @@ -195,11 +193,8 @@ fn lex_query(query: &LexXrpcQuery) -> Result { } else { quote!() }; - let outputs = if let Some(body) = &query.output { - xrpc_body(body, "Output")? - } else { - quote!() - }; + let outputs = + if let Some(body) = &query.output { xrpc_body(body, "Output")? } else { quote!() }; let errors = xrpc_errors(&query.errors)?; Ok(quote! { #params @@ -209,16 +204,10 @@ fn lex_query(query: &LexXrpcQuery) -> Result { } fn lex_procedure(procedure: &LexXrpcProcedure) -> Result { - let inputs = if let Some(body) = &procedure.input { - xrpc_body(body, "Input")? - } else { - quote!() - }; - let outputs = if let Some(body) = &procedure.output { - xrpc_body(body, "Output")? - } else { - quote!() - }; + let inputs = + if let Some(body) = &procedure.input { xrpc_body(body, "Input")? } else { quote!() }; + let outputs = + if let Some(body) = &procedure.output { xrpc_body(body, "Output")? } else { quote!() }; let errors = xrpc_errors(&procedure.errors)?; Ok(quote! { #inputs @@ -306,12 +295,7 @@ fn lex_object_property( LexObjectProperty::Ref(r#ref) => ref_type(r#ref)?, LexObjectProperty::Union(union) => union_type( union, - format!( - "{}{}Refs", - object_name.to_pascal_case(), - name.to_pascal_case() - ) - .as_str(), + format!("{}{}Refs", object_name.to_pascal_case(), name.to_pascal_case()).as_str(), )?, LexObjectProperty::Bytes(bytes) => bytes_type(bytes)?, LexObjectProperty::CidLink(cid_link) => cid_link_type(cid_link)?, @@ -324,19 +308,11 @@ fn lex_object_property( }; let field_name = format_ident!( "{}", - if name == "ref" || name == "type" { - format!("r#{name}") - } else { - name.to_snake_case() - } + if name == "ref" || name == "type" { format!("r#{name}") } else { name.to_snake_case() } ); let mut attributes = match property { LexObjectProperty::Bytes(_) => { - let default = if is_required { - quote!() - } else { - quote!(#[serde(default)]) - }; + let default = if is_required { quote!() } else { quote!(#[serde(default)]) }; quote! { #default #[serde(with = "serde_bytes")] @@ -345,10 +321,10 @@ fn lex_object_property( _ => quote!(), }; if !is_required { - field_type = quote!(Option<#field_type>); + field_type = quote!(core::option::Option<#field_type>); attributes = quote! { #attributes - #[serde(skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "core::option::Option::is_none")] }; } Ok(quote! { @@ -593,11 +569,7 @@ pub fn enum_common( for r#ref in refs { let path = resolve_path(r#ref, if is_record { "record" } else { "main" })?; let rename = if r#ref.starts_with('#') { - format!( - "{}{}", - schema_id.expect("schema id must be specified"), - r#ref - ) + format!("{}{}", schema_id.expect("schema id must be specified"), r#ref) } else { r#ref.clone() }; @@ -614,9 +586,8 @@ pub fn enum_common( let name = format_ident!("{}", parts.join("")); let mut feature = quote!(); if is_record { - if let Some((_, Some(feature_name))) = namespaces - .iter() - .find(|(prefix, _)| r#ref.starts_with(prefix)) + if let Some((_, Some(feature_name))) = + namespaces.iter().find(|(prefix, _)| r#ref.starts_with(prefix)) { feature = quote! { #[cfg_attr(docsrs, doc(cfg(feature = #feature_name)))] @@ -657,9 +628,8 @@ pub fn impl_into_record( parts.pop(); let name = format_ident!("{}", parts.join("")); let mut feature = quote!(); - if let Some((_, Some(feature_name))) = namespaces - .iter() - .find(|(prefix, _)| r#ref.starts_with(prefix)) + if let Some((_, Some(feature_name))) = + namespaces.iter().find(|(prefix, _)| r#ref.starts_with(prefix)) { feature = quote! { #[cfg_attr(docsrs, doc(cfg(feature = #feature_name)))] @@ -739,9 +709,8 @@ pub fn client( }; methods.push(method); } - let feature = if let Some((_, Some(feature_name))) = namespaces - .iter() - .find(|(prefix, _)| key.starts_with(prefix)) + let feature = if let Some((_, Some(feature_name))) = + namespaces.iter().find(|(prefix, _)| key.starts_with(prefix)) { quote!(#[cfg(feature = #feature_name)]) } else { @@ -810,11 +779,8 @@ fn client_services( #feature pub #name: #name::Service, }); - let target = if target.is_empty() { - child.to_string() - } else { - format!("{target}.{child}") - }; + let target = + if target.is_empty() { child.to_string() } else { format!("{target}.{child}") }; let submodule = client_services(&target, tree, namespaces)?; mods.push(quote! { #feature @@ -853,11 +819,8 @@ fn client_new( if *is_leaf { continue; } - let parts = if key.is_empty() { - vec![*name] - } else { - key.split('.').chain([*name]).collect_vec() - }; + let parts = + if key.is_empty() { vec![*name] } else { key.split('.').chain([*name]).collect_vec() }; let namespace = parts.join("."); let feature = if let Some((_, Some(feature_name))) = namespaces.iter().find(|(prefix, _)| prefix == &namespace) @@ -909,18 +872,10 @@ fn xrpc_impl_query(query: &LexXrpcQuery, nsid: &str) -> Result { let generic_args = vec![ if has_params { quote!(_) } else { quote!(()) }, quote!(()), - if output_type == OutputType::Data { - quote!(_) - } else { - quote!(()) - }, + if output_type == OutputType::Data { quote!(_) } else { quote!(()) }, quote!(_), ]; - let param_value = if has_params { - quote!(Some(params)) - } else { - quote!(None) - }; + let param_value = if has_params { quote!(Some(params)) } else { quote!(None) }; let nsid_path = resolve_path(nsid, "NSID")?; let xrpc_call = quote! { self.xrpc.send_xrpc::<#(#generic_args),*>(&atrium_xrpc::XrpcRequest { @@ -966,11 +921,7 @@ fn xrpc_impl_procedure(procedure: &LexXrpcProcedure, nsid: &str) -> Result Result { let mut derives = Vec::new(); - for derive in &[ - "serde::Serialize", - "serde::Deserialize", - "Debug", - "Clone", - "PartialEq", - "Eq", - ] { + for derive in &["serde::Serialize", "serde::Deserialize", "Debug", "Clone", "PartialEq", "Eq"] { derives.push(syn::parse_str::(derive)?); } Ok(quote!(#[derive(#(#derives),*)]))