// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: tools.ozone.moderation.defs // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. pub mod cancel_scheduled_actions; pub mod emit_event; pub mod get_account_timeline; pub mod get_event; pub mod get_record; pub mod get_records; pub mod get_repo; pub mod get_reporter_stats; pub mod get_repos; pub mod get_subjects; pub mod list_scheduled_actions; pub mod query_events; pub mod query_statuses; pub mod schedule_action; pub mod search_repos; ///Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct AccountEvent<'a> { ///Indicates that the account has a repository which can be fetched from the host that emitted this event. pub active: bool, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, pub timestamp: jacquard_common::types::string::Datetime, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct AccountHosting<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub deactivated_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub deleted_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub reactivated_at: std::option::Option, #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub updated_at: std::option::Option, } ///Statistics about a particular account subject #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct AccountStats<'a> { ///Total number of appeals against a moderation action on the account #[serde(skip_serializing_if = "std::option::Option::is_none")] pub appeal_count: std::option::Option, ///Number of times the account was escalated #[serde(skip_serializing_if = "std::option::Option::is_none")] pub escalate_count: std::option::Option, ///Total number of reports on the account #[serde(skip_serializing_if = "std::option::Option::is_none")] pub report_count: std::option::Option, ///Number of times the account was suspended #[serde(skip_serializing_if = "std::option::Option::is_none")] pub suspend_count: std::option::Option, ///Number of times the account was taken down #[serde(skip_serializing_if = "std::option::Option::is_none")] pub takedown_count: std::option::Option, } ///Age assurance info coming directly from users. Only works on DID subjects. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct AgeAssuranceEvent<'a> { ///The unique identifier for this instance of the age assurance flow, in UUID format. #[serde(borrow)] pub attempt_id: jacquard_common::CowStr<'a>, ///The IP address used when completing the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub complete_ip: std::option::Option>, ///The user agent used when completing the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub complete_ua: std::option::Option>, ///The date and time of this write operation. pub created_at: jacquard_common::types::string::Datetime, ///The IP address used when initiating the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub init_ip: std::option::Option>, ///The user agent used when initiating the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub init_ua: std::option::Option>, ///The status of the age assurance process. #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, } ///Age assurance status override by moderators. Only works on DID subjects. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct AgeAssuranceOverrideEvent<'a> { ///Comment describing the reason for the override. #[serde(borrow)] pub comment: jacquard_common::CowStr<'a>, ///The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state. #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct BlobView<'a> { #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, pub created_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub details: std::option::Option>, #[serde(borrow)] pub mime_type: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub moderation: std::option::Option>, pub size: i64, } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum BlobViewRecordDetails<'a> {} ///Logs cancellation of a scheduled takedown action for an account. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct CancelScheduledTakedownEvent<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } ///Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct IdentityEvent<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub handle: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pds_host: std::option::Option>, pub timestamp: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub tombstone: std::option::Option, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ImageDetails<'a> { pub height: i64, pub width: i64, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventAcknowledge<'a> { ///If true, all other reports on content authored by this account will be resolved (acknowledged). #[serde(skip_serializing_if = "std::option::Option::is_none")] pub acknowledge_account_subjects: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } ///Add a comment to a subject. An empty comment will clear any previously set sticky comment. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventComment<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, ///Make the comment persistent on the subject #[serde(skip_serializing_if = "std::option::Option::is_none")] pub sticky: std::option::Option, } ///Divert a record's blobs to a 3rd party service for further scanning/tagging #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventDivert<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } ///Keep a log of outgoing email to a user #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventEmail<'a> { ///Additional comment about the outgoing comm. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, ///The content of the email sent to the user. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub content: std::option::Option>, ///The subject line of the email sent to the user. #[serde(borrow)] pub subject_line: jacquard_common::CowStr<'a>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventEscalate<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } ///Apply/Negate labels on a subject #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventLabel<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, #[serde(borrow)] pub create_label_vals: Vec>, ///Indicates how long the label will remain on the subject. Only applies on labels that are being added. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub duration_in_hours: std::option::Option, #[serde(borrow)] pub negate_label_vals: Vec>, } ///Mute incoming reports on a subject #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventMute<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, ///Indicates how long the subject should remain muted. pub duration_in_hours: i64, } ///Mute incoming reports from an account #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventMuteReporter<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, ///Indicates how long the account should remain muted. Falsy value here means a permanent mute. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub duration_in_hours: std::option::Option, } ///Set priority score of the subject. Higher score means higher priority. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventPriorityScore<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, pub score: i64, } ///Report a subject #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventReport<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, ///Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub is_reporter_muted: std::option::Option, #[serde(borrow)] pub report_type: crate::com_atproto::moderation::ReasonType<'a>, } ///Resolve appeal on a subject #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventResolveAppeal<'a> { ///Describe resolution. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } ///Revert take down action on a subject #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventReverseTakedown<'a> { ///Describe reasoning behind the reversal. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } ///Add/Remove a tag on a subject #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventTag<'a> { ///Tags to be added to the subject. If already exists, won't be duplicated. #[serde(borrow)] pub add: Vec>, ///Additional comment about added/removed tags. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, ///Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. #[serde(borrow)] pub remove: Vec>, } ///Take down a subject permanently or temporarily #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventTakedown<'a> { ///If true, all other reports on content authored by this account will be resolved (acknowledged). #[serde(skip_serializing_if = "std::option::Option::is_none")] pub acknowledge_account_subjects: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, ///Indicates how long the takedown should be in effect before automatically expiring. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub duration_in_hours: std::option::Option, ///Names/Keywords of the policies that drove the decision. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub policies: std::option::Option>>, } ///Unmute action on a subject #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventUnmute<'a> { ///Describe reasoning behind the reversal. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } ///Unmute incoming reports from an account #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventUnmuteReporter<'a> { ///Describe reasoning behind the reversal. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventView<'a> { pub created_at: jacquard_common::types::string::Datetime, #[serde(borrow)] pub created_by: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub creator_handle: std::option::Option>, #[serde(borrow)] pub event: ModEventViewRecordEvent<'a>, pub id: i64, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub mod_tool: std::option::Option>, #[serde(borrow)] pub subject: ModEventViewRecordSubject<'a>, #[serde(borrow)] pub subject_blob_cids: Vec>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_handle: std::option::Option>, } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum ModEventViewRecordEvent<'a> {} #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum ModEventViewRecordSubject<'a> { #[serde(rename = "com.atproto.admin.defs#repoRef")] DefsRepoRef(Box>), #[serde(rename = "com.atproto.repo.strongRef")] StrongRef(Box>), #[serde(rename = "chat.bsky.convo.defs#messageRef")] DefsMessageRef(Box>), } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModEventViewDetail<'a> { pub created_at: jacquard_common::types::string::Datetime, #[serde(borrow)] pub created_by: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub event: ModEventViewDetailRecordEvent<'a>, pub id: i64, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub mod_tool: std::option::Option>, #[serde(borrow)] pub subject: ModEventViewDetailRecordSubject<'a>, #[serde(borrow)] pub subject_blobs: Vec>, } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum ModEventViewDetailRecordEvent<'a> {} #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum ModEventViewDetailRecordSubject<'a> {} ///Moderation tool information for tracing the source of the action #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModTool<'a> { ///Additional arbitrary metadata about the source #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub meta: std::option::Option>, ///Name/identifier of the source (e.g., 'automod', 'ozone/workspace') #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Moderation<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_status: std::option::Option< crate::tools_ozone::moderation::SubjectStatusView<'a>, >, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ModerationDetail<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_status: std::option::Option< crate::tools_ozone::moderation::SubjectStatusView<'a>, >, } ///Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RecordEvent<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, #[serde(borrow)] pub op: jacquard_common::CowStr<'a>, pub timestamp: jacquard_common::types::string::Datetime, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RecordHosting<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub deleted_at: std::option::Option, #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub updated_at: std::option::Option, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RecordView<'a> { #[serde(borrow)] pub blob_cids: Vec>, #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(borrow)] pub moderation: crate::tools_ozone::moderation::Moderation<'a>, #[serde(borrow)] pub repo: crate::tools_ozone::moderation::RepoView<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RecordViewDetail<'a> { #[serde(borrow)] pub blobs: Vec>, #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, #[serde(borrow)] pub moderation: crate::tools_ozone::moderation::ModerationDetail<'a>, #[serde(borrow)] pub repo: crate::tools_ozone::moderation::RepoView<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: jacquard_common::types::value::Data<'a>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RecordViewNotFound<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } ///Statistics about a set of record subject items #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RecordsStats<'a> { ///Number of items that were appealed at least once #[serde(skip_serializing_if = "std::option::Option::is_none")] pub appealed_count: std::option::Option, ///Number of items that were escalated at least once #[serde(skip_serializing_if = "std::option::Option::is_none")] pub escalated_count: std::option::Option, ///Number of item currently in "reviewOpen" or "reviewEscalated" state #[serde(skip_serializing_if = "std::option::Option::is_none")] pub pending_count: std::option::Option, ///Number of item currently in "reviewNone" or "reviewClosed" state #[serde(skip_serializing_if = "std::option::Option::is_none")] pub processed_count: std::option::Option, ///Number of items that were reported at least once #[serde(skip_serializing_if = "std::option::Option::is_none")] pub reported_count: std::option::Option, ///Total number of item in the set #[serde(skip_serializing_if = "std::option::Option::is_none")] pub subject_count: std::option::Option, ///Number of item currently taken down #[serde(skip_serializing_if = "std::option::Option::is_none")] pub takendown_count: std::option::Option, ///Cumulative sum of the number of reports on the items in the set #[serde(skip_serializing_if = "std::option::Option::is_none")] pub total_reports: std::option::Option, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RepoView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub deactivated_at: std::option::Option, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub email: std::option::Option>, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub invite_note: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub invited_by: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub invites_disabled: std::option::Option, #[serde(borrow)] pub moderation: crate::tools_ozone::moderation::Moderation<'a>, #[serde(borrow)] pub related_records: Vec>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub threat_signatures: std::option::Option< Vec>, >, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RepoViewDetail<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub deactivated_at: std::option::Option, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub email: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub email_confirmed_at: std::option::Option< jacquard_common::types::string::Datetime, >, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub invite_note: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub invited_by: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub invites: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub invites_disabled: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, #[serde(borrow)] pub moderation: crate::tools_ozone::moderation::ModerationDetail<'a>, #[serde(borrow)] pub related_records: Vec>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub threat_signatures: std::option::Option< Vec>, >, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RepoViewNotFound<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ReporterStats<'a> { ///The total number of reports made by the user on accounts. pub account_report_count: i64, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, ///The total number of accounts labeled as a result of the user's reports. pub labeled_account_count: i64, ///The total number of records labeled as a result of the user's reports. pub labeled_record_count: i64, ///The total number of reports made by the user on records. pub record_report_count: i64, ///The total number of accounts reported by the user. pub reported_account_count: i64, ///The total number of records reported by the user. pub reported_record_count: i64, ///The total number of accounts taken down as a result of the user's reports. pub takendown_account_count: i64, ///The total number of records taken down as a result of the user's reports. pub takendown_record_count: i64, } ///Account credentials revocation by moderators. Only works on DID subjects. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RevokeAccountCredentialsEvent<'a> { ///Comment describing the reason for the revocation. #[serde(borrow)] pub comment: jacquard_common::CowStr<'a>, } ///Logs a scheduled takedown action for an account. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ScheduleTakedownEvent<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub execute_after: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub execute_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub execute_until: std::option::Option, } ///View of a scheduled moderation action #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ScheduledActionView<'a> { ///Type of action to be executed #[serde(borrow)] pub action: jacquard_common::CowStr<'a>, ///When the scheduled action was created pub created_at: jacquard_common::types::string::Datetime, ///DID of the user who created this scheduled action #[serde(borrow)] pub created_by: jacquard_common::types::string::Did<'a>, ///Subject DID for the action #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, ///Serialized event object that will be propagated to the event when performed #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub event_data: std::option::Option>, ///Earliest time to execute the action (for randomized scheduling) #[serde(skip_serializing_if = "std::option::Option::is_none")] pub execute_after: std::option::Option, ///Exact time to execute the action #[serde(skip_serializing_if = "std::option::Option::is_none")] pub execute_at: std::option::Option, ///Latest time to execute the action (for randomized scheduling) #[serde(skip_serializing_if = "std::option::Option::is_none")] pub execute_until: std::option::Option, ///ID of the moderation event created when action was successfully executed #[serde(skip_serializing_if = "std::option::Option::is_none")] pub execution_event_id: std::option::Option, ///Auto-incrementing row ID pub id: i64, ///When the action was last attempted to be executed #[serde(skip_serializing_if = "std::option::Option::is_none")] pub last_executed_at: std::option::Option, ///Reason for the last execution failure #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub last_failure_reason: std::option::Option>, ///Whether execution time should be randomized within the specified range #[serde(skip_serializing_if = "std::option::Option::is_none")] pub randomize_execution: std::option::Option, ///Current status of the scheduled action #[serde(borrow)] pub status: jacquard_common::CowStr<'a>, ///When the scheduled action was last updated #[serde(skip_serializing_if = "std::option::Option::is_none")] pub updated_at: std::option::Option, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum SubjectReviewState<'a> { ReviewOpen, ReviewEscalated, ReviewClosed, ReviewNone, Other(jacquard_common::CowStr<'a>), } impl<'a> SubjectReviewState<'a> { pub fn as_str(&self) -> &str { match self { Self::ReviewOpen => "#reviewOpen", Self::ReviewEscalated => "#reviewEscalated", Self::ReviewClosed => "#reviewClosed", Self::ReviewNone => "#reviewNone", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for SubjectReviewState<'a> { fn from(s: &'a str) -> Self { match s { "#reviewOpen" => Self::ReviewOpen, "#reviewEscalated" => Self::ReviewEscalated, "#reviewClosed" => Self::ReviewClosed, "#reviewNone" => Self::ReviewNone, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for SubjectReviewState<'a> { fn from(s: String) -> Self { match s.as_str() { "#reviewOpen" => Self::ReviewOpen, "#reviewEscalated" => Self::ReviewEscalated, "#reviewClosed" => Self::ReviewClosed, "#reviewNone" => Self::ReviewNone, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> AsRef for SubjectReviewState<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for SubjectReviewState<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for SubjectReviewState<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl jacquard_common::IntoStatic for SubjectReviewState<'_> { type Output = SubjectReviewState<'static>; fn into_static(self) -> Self::Output { match self { SubjectReviewState::ReviewOpen => SubjectReviewState::ReviewOpen, SubjectReviewState::ReviewEscalated => SubjectReviewState::ReviewEscalated, SubjectReviewState::ReviewClosed => SubjectReviewState::ReviewClosed, SubjectReviewState::ReviewNone => SubjectReviewState::ReviewNone, SubjectReviewState::Other(v) => SubjectReviewState::Other(v.into_static()), } } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SubjectStatusView<'a> { ///Statistics related to the account subject #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub account_stats: std::option::Option< crate::tools_ozone::moderation::AccountStats<'a>, >, ///Current age assurance state of the subject. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub age_assurance_state: std::option::Option>, ///Whether or not the last successful update to age assurance was made by the user or admin. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub age_assurance_updated_by: std::option::Option>, ///True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub appealed: std::option::Option, ///Sticky comment on the subject. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub comment: std::option::Option>, ///Timestamp referencing the first moderation status impacting event was emitted on the subject pub created_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub hosting: std::option::Option>, pub id: i64, ///Timestamp referencing when the author of the subject appealed a moderation action #[serde(skip_serializing_if = "std::option::Option::is_none")] pub last_appealed_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub last_reported_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub last_reviewed_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub last_reviewed_by: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub mute_reporting_until: std::option::Option< jacquard_common::types::string::Datetime, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub mute_until: std::option::Option, ///Numeric value representing the level of priority. Higher score means higher priority. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub priority_score: std::option::Option, ///Statistics related to the record subjects authored by the subject's account #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub records_stats: std::option::Option< crate::tools_ozone::moderation::RecordsStats<'a>, >, #[serde(borrow)] pub review_state: crate::tools_ozone::moderation::SubjectReviewState<'a>, #[serde(borrow)] pub subject: SubjectStatusViewRecordSubject<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_blob_cids: std::option::Option< Vec>, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subject_repo_handle: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub suspend_until: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub tags: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub takendown: std::option::Option, ///Timestamp referencing when the last update was made to the moderation status of the subject pub updated_at: jacquard_common::types::string::Datetime, } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum SubjectStatusViewRecordHosting<'a> {} #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum SubjectStatusViewRecordSubject<'a> { #[serde(rename = "com.atproto.admin.defs#repoRef")] DefsRepoRef(Box>), #[serde(rename = "com.atproto.repo.strongRef")] StrongRef(Box>), #[serde(rename = "chat.bsky.convo.defs#messageRef")] DefsMessageRef(Box>), } ///Detailed view of a subject. For record subjects, the author's repo and profile will be returned. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SubjectView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub profile: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub record: std::option::Option< crate::tools_ozone::moderation::RecordViewDetail<'a>, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub repo: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option< crate::tools_ozone::moderation::SubjectStatusView<'a>, >, #[serde(borrow)] pub subject: jacquard_common::CowStr<'a>, #[serde(borrow)] pub r#type: crate::com_atproto::moderation::SubjectType<'a>, } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum SubjectViewRecordProfile<'a> {} #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct VideoDetails<'a> { pub height: i64, pub length: i64, pub width: i64, }